- t2medAsked on June 18, 2015 at 04:22 AM
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 email@example.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="firstname.lastname@example.org" -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!
- BorisAnswered 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:
Please let us know how it goes.
- t2medAnswered 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:
- BenAnswered 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.
- t2medAnswered 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.
- BenAnswered 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?