We are using Laravel v.5.8 and have our public files in a directory like...
/www/public/pubfiles/myfile.php
I can link to these with no problem. We also have an upload script that by design puts the files in...
/uploads/nonlinkablefile
And then stores the path and a filename, etc. in a db. When someone clicks a link to retrieve these files, a script gets the file and returns it as a download.
The files in the second option are stored this way so they cannot be linked to or shared. We are able to check a users permission on pages or directly on a file to see if they should be able to download.
What I'm wondering now is, if we can do those checks, and then somehow display the files (PDFs moslty) in a new tab in the browser vs. forcing a download.
Since there isn't a web-enable path to the file, I'm not finding a way to do so.
Thanks.