Description
Is your feature request related to a problem? Please describe.
With the addition of file triggers, the only one that is missing is beforeGetFile. Let's say that I want to restrict fetching a file to only the user who initially created it. Currently there is no way to do that since anyone with the file url can access it.
Describe the solution you'd like
Add a beforeGetFile file trigger so that an additional layer of security can be added when fetching files
Describe alternatives you've considered
None
Additional context
Currently anyone who has the file name/url can retrieve a file. Adding a beforeGetFile trigger will allow for additional file security. My plan is to use the beforeSaveFile
and afterSaveFile
triggers to keep track of files and who created them. I can then use the beforeGetFile
to restrict access to only the files they have created. The challenge is there is no session token passed in when retrieving files. I have no problem tackling this feature request, but I would like to get feedback on the best way to approach this?