What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    How can I retrieve uploaded files through API or webhook

    Asked by AmSteve 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?

  • Profile Image
    JotForm Support

    Answered by Nik_C on January 21, 2017 at 01: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!

  • Profile Image

    Answered by AmSteve on January 21, 2017 at 03:45 PM
    Thanks 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.
    ...
  • Profile Image
    JotForm Support

    Answered by EltonCris on January 21, 2017 at 08: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:

    https://s3.amazonaws.com/jotformWidgets/dragDropUpload/70168248381964/0fa0e7achristmas-pattern-with-snow_1045-460.jpg

    Hope this helps!