What is JotForm?
JotForm is a freeonline 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.

Why do you not want to answer this thread?(Your answer will be sent to Jeanette and Aytekin)

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?

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:

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.

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.

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?