File upload with a Contour form - questions and suggestions
When using the file upload on a Contour form it would be useful to define what file types can be uploaded, e.g. PDF, JPEG etc. so as to prevent users uploading malicious files.
Also, is there anyway to define where files are saved? The default location is /umbraco/plugins/umbracoContour/files/3bde2a42-4ac4-4425-af88-fde142b712b6/file name. The problem here is that if 2 users upload a file of the same name then the original will get overwritten. It would be good if each file was saved in a sub folder to prevent this happening.
Also, in the entries section of Contour it would be nice if the link to the file was active to save users having to copy and paste into a browser.
Currently you cannot configure where to store the files. But I don't think a file will get overwritten, the guid id folder should take care of that (so not all files are stored in the same folder)
The entries viewer will be updated so it shows a link when it's a file.
Contour creates a new folder for each form based on the GUID but ALL form submissions for that form go in the same folder. I have tested it and if the file name is the same it does get overwritten. I am going to use this for a job application site so i just know everyone will upload files called "cv.doc" which is going to cause problems.
The entries viewer does show the file location but it would be nice if this were a live link rather than just text - though i have written some XSLT to show this in the email.
There does appear to be a line in UmbracoContour.config that looks like it should define the storage directory:
I didn't find a solution as the client has not approved the job yet. I am hoping the Contour team will be working on a solution that will give all files unique names on upload and add links to them in the form submissions list in the Contour entries page.
There are some underlying architectual changes needed to actually enable support of the individual field-type (to for exemple configure where to save files)
So instead of having everyone wait for us to wrap that up in the next version, we've decided to release the source of all types in Contour as a free download. This means that if you have a component in contour that you wish to change, just a tiny bit, you can now download the source and base a new component on it.
So hopefully this will solve your issue, simply changing the way the Upload Fieldtype saves files.
File upload with a Contour form - questions and suggestions
When using the file upload on a Contour form it would be useful to define what file types can be uploaded, e.g. PDF, JPEG etc. so as to prevent users uploading malicious files.
Also, is there anyway to define where files are saved? The default location is /umbraco/plugins/umbracoContour/files/3bde2a42-4ac4-4425-af88-fde142b712b6/file name. The problem here is that if 2 users upload a file of the same name then the original will get overwritten. It would be good if each file was saved in a sub folder to prevent this happening.
Also, in the entries section of Contour it would be nice if the link to the file was active to save users having to copy and paste into a browser.
Thanks
Dan
Comment author was deleted
Hi Dan,
Currently you cannot configure where to store the files. But I don't think a file will get overwritten, the guid id folder should take care of that (so not all files are stored in the same folder)
The entries viewer will be updated so it shows a link when it's a file.
Regards,
Tim
Contour creates a new folder for each form based on the GUID but ALL form submissions for that form go in the same folder. I have tested it and if the file name is the same it does get overwritten. I am going to use this for a job application site so i just know everyone will upload files called "cv.doc" which is going to cause problems.
The entries viewer does show the file location but it would be nice if this were a live link rather than just text - though i have written some XSLT to show this in the email.
There does appear to be a line in UmbracoContour.config that looks like it should define the storage directory:
Did you find a solution for this problem? I am using contour for the same thing and have the same difficulty.
I didn't find a solution as the client has not approved the job yet. I am hoping the Contour team will be working on a solution that will give all files unique names on upload and add links to them in the form submissions list in the Contour entries page.
I also have the same exact same issues as Dan in my project.
What's the roadmap for Contour? Whould be great to know if Contour is getting support for this in a near future or if I need to build my own form.
/Niels
There are some underlying architectual changes needed to actually enable support of the individual field-type (to for exemple configure where to save files)
So instead of having everyone wait for us to wrap that up in the next version, we've decided to release the source of all types in Contour as a free download. This means that if you have a component in contour that you wish to change, just a tiny bit, you can now download the source and base a new component on it.
So hopefully this will solve your issue, simply changing the way the Upload Fieldtype saves files.
http://our.umbraco.org/projects/umbraco-contour-shared-source
Is the source still available? (link is invalid)
For future Googlers I found the link here:
http://our.umbraco.org/FileDownload?id=2922
In the version we are using "UploadStorageDirectory" is available as an option in the config but is never implemented in the code.
We have opted for a virtual directory in IIS for umbraco/plugins/umbracoContour/files and pointing at the desired upload location.
Has anyone managed to change the source or implement a workaroung for this?
I am facing with the same issue, running latet 7.1.4 w latest contour.
The source code above, with latest dll references does not compile.
Would appreicate if someone can shed some light.
many thanks!
i also have this issue.
Ideally i would be able to change the upload field, specifying a value from the form in the folder name.
For example:
has anyone implemented anything like this?
hitting this requirement in a new installation. Is there any word or estimate on when such feature or workaround will be available?
is working on a reply...