Answer the question
In order to leave comments, you need to log in
Yii2: limit display (return) of files depending on the role of the user?
Actually a subject.
I put the file in the folder web/tickets/{ID}/file.jpg
How can I prevent this file from being viewed (even if the user has a direct link) if the file is not from the user that uploaded it?
Answer the question
In order to leave comments, you need to log in
Not to prohibit in any way, you need to remove the files from the web server directory (so that there are no direct links to them) and create a special handler that will read the file from the external directory and give its contents to the browser based on user rights.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question