Hello,
If you want to work only with code, you will need to trigger the upload process through code as well instead of using the “connect to data” options.
See the first example in the upload button’s reference: https://www.wix.com/code/reference/$w.UploadButton.html
Notice how it logs “uploadedFile.url” to the console. You would instead save it as the “doc” attribute of your form.
Good luck