We have a a form that has a File Upload element. The form works fine and the file gets stored in the VPP content area.
The issue is that we need an authenticated user that is NOT an Administrator to be able to retrieve the uploaded file. We are emailing them a link, so they have the content area file name, but no matter what we do, I can not seem to find a way to give them the right privileges to pull the file.
This article was helpful: https://world.episerver.com/documentation/developer-guides/forms/encrypting-form-data/ but did not do the trick.
Another clue is that we have test files that were uploaded before a Forms upgrade and they are retrieavble (e.g. /contentassets/313745432f35457b930b0e/326207848255286_testfile.pdf but seem maybe to be accessible without even authenticating), but since the upgrade, all of the new files are in an /uploaded-files/ media content folder (e.g. /contentassets/313745432f35457b930b0e/uploaded-files/agenda_20171106_636457468962866541.docx). I am thinking that I need to find away to give the user the permission to access the Media folder "Uploaded Files" for the File Upload block, but I can not figure out how to do this.
Because the security reason, we removed the everyone's read access ritght from the folder which stored files. The simplest way to achive your requirements, I think, is that create an controller to handle user's downloading file. In that controller you can check permissions...then return the file stream. Ofcouse, when send file's link via email, you need to to generate the link according your controller path.
Another option, you can replace DataSubmissionService by yours with overriding the method GetOrCreateFolderForStoringFiles. You can add access rights for any group you want to allow to download the files.
Hope this help.
Thanks we will give it a try!
I'm experiencing the exact same problem.
Did you manage to solve this?
Best regards, Kristian.
It got backlogged so we only tried a few weeks ago and it did work.
We ended up implementing the 2nd option and replaced DataSubmissionService with an override of the method GetOrCreateFolderForStoringFiles.