-
AmSteveAsked on January 21, 2017 at 10:41 AM
I'm implementing a file upload form where I would like to copy the uploaded files to my server after the form has been submitted. I'm familiar with the Webhook integration and presume that feature could be used and hope you can point me to some samples.
I would be willing to use the native 'file upload' control but would prefer the drag 'n drop widget. Will my goal of copying the file from JF to my server be complicated by using the drag 'n drop widget?
-
Nik_CReplied on January 21, 2017 at 1:47 PM
Thank you for contacting our support.
Did you consider using an FTP and sending your submissions and uploads to your FTP server. If you would like to use FTP please refer to this guide: https://www.jotform.com/help/177-How-to-Send-Submission-Data-File-Upload-via-FTP
If it doesn't work for you please let us know so we can review some other possible options.
Thank you!
-
AmSteveReplied on January 21, 2017 at 3:45 PMThanks for your reply - but all i need is the link - i don't think i need
ftp in this case because your api will provide me an address that my
server-side code can access.
and as I type this i realize the question is api specific and might need to
be forworded to the api team?
This is really where the webhook comes into play. when a file is saved my
server hears a post from yours and can just save the file as a matter of
that course. i think.
... -
Elton Support Team LeadReplied on January 21, 2017 at 8:23 PM
Currently, the API does not send the actual files except the file names. However, you can define in your script the base URLs along with the parameters e.g. username, formID to generate the file URL.
Here are examples:
For the native file upload field, the file format is the following:
https://www.jotformpro.com/uploads/USERNAME/formID/submissionID/fileName
where:
USERNAME is your username e.g. AmSteve
formID is the form ID in used
submissionID is the submission ID (long string numbers) generated after submission
fileName is the actual file name
Sample:
https://www.jotformpro.com/uploads/EltonCris/70168248381964/360857027001347941/widget%20icon.png
For the drag and drop upload widget, you can use the following format:
https://s3.amazonaws.com/jotformWidgets/dragDropUpload/formID/fileName
Sample:
Hope this helps!