Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Retrieving uploaded files by a non-admin user

Vote:
 

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.

Any thoughts?

Screenshot of folder user needs access to

Screenshot here

#185056
Edited, Nov 09, 2017 0:48
Vote:
 

Hi,

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.

#185072
Nov 09, 2017 3:47
Vote:
 

Thanks we will give it a try!

#185074
Nov 09, 2017 4:11
Vote:
 

Hi David!

I'm experiencing the exact same problem. 

Did you manage to solve this?

Best regards, Kristian.

#187864
Feb 05, 2018 11:26
Vote:
 

Hi 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.

#187869
Edited, Feb 05, 2018 11:49
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.