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

    Is there a way to preselect a local file for upload via URL?

    Asked by t2med on June 18, 2015 at 04:22 AM

    Dear support,

    is there a way to preselect a local file for upload via URL, like I tried in this example?

    https://secure.jotformeu.com/form/50843592116354?vollstandigerName9[first]=Frank&vollstandigerName9[last]=Testomat&ihrProblem=delicate problem&email8=frank.testomat@mail.com&ausfuhrlicheProblembeschreibung=This is a lot of text describing the nature of the problem. See attached screenshot!&fugenSie1=@/temp/screenshot.png


    Alternatively: Is there a way to prefill the form and upload a file using the curl tool?

    curl -F vollstandigerName9[first]="Frank" -F vollstandigerName9[last]="Testomat" -F ihrProblem="delicate problem" -F email8="frank.testomat@mail.com" -F ausfuhrlicheProblembeschreibung="This is a lot of text describing the nature of the problem." -FfugenSie1=@/temp/screenshot.png https://secure.jotformeu.com/form/50843592116354


    Many thanks in advance!

  • Profile Image

    Answered by Boris on June 18, 2015 at 06:13 AM


    You can't prepopulate a form field with a file for upload, due to the security context issues and sandboxes that are implemented to prevent websites from accessing your local files. So the method with URL prepopulating to a local file will not work, the file needs to be added by user manually navigating to a file and selecting it from their system.


    When it comes to using curl to submit a form with your local file, please take a look at our documentation page to see if this is what you are trying to accomplish:


    You will need to create an API Key on the API tab of your account page, as explained at the top of the documentation: http://api.jotform.com/docs/#gettingstarted

    Please let us know how it goes.

  • Profile Image

    Answered by t2med on June 18, 2015 at 06:35 AM



    Thank you for your answer!

    How does this work in case of file upload fields?

    That does not seem to be easy, as can bee seen here:


  • Profile Image

    Answered by Ben on June 18, 2015 at 09:03 AM

    I would just like to confirm if you are now looking for a way to use the cURL to post the field data and the file to the jotform?

    If so, please note that you can not have that code pre-fill the file to submit for your users. It would only be an option that you could use if you are looking to submit the file yourself, or from few different devices, that you are administrator of.

    To best help you, I would like to ask you to give us more details as to why you would like to pre-populate the file to be uploaded as that would give us enough details to know how to best help you.

  • Profile Image

    Answered by t2med on June 19, 2015 at 10:49 AM

    Many thanks for your answer. I have now deployed a standard HTML form on our own webserver and use cURL to submit form data and a file via shell script.

    It is a tool for our support to submit application logfiles including some basic data without the need for our customers to manually attach the log files to the form.

    So the form is used manually and via mouse click.

  • Profile Image

    Answered by Ben on June 19, 2015 at 11:55 AM

    If I have understood you correctly you have a form (not a jotform) on your webserver and you have set the form to submit the data of it to the jotform over a shell script.

    Now the second part is something that I am having trouble understanding, you are receiving the files from your customers through some app / application that is automatically sent to your server and that is the file that you would like to send to your jotform?