You need to use the
FormData and
Fetch APIs and
POST to the native action
?a=FinishEditRecord with the hidden parameter
subact set to "
save". This pastie does a more complicated task of copying a file attachment between tables
without an intermediate download but does use the APIs that are needed to perform your task:
How To Copy File Attachments Between Tables Without Download?https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=574I would advise you that the technical aspects of scripting the upload is not really the most difficult part. You have to assess administrative and workflow issues such as these:
- file storage and cost
- upload time, rate limiting and QuickBase quotas
- associating a particular file with an existing record
- associating metadata (author, document date & version, notes) with the uploaded file
- file name uniqueness, primary key selection
- archiving and restoration of files
Let's say your files are photos taken in the field of say a house inspection. In addition to uploading the photos you have to associate the metadata for such things as the date and location the photos were taken at and annotations for what the photos represents (kitchen, master bedroom etc).
If your files are pdf or Word documents there may also be meta data associated with the author, date, version, instructions for using and filling out the document.