Closed benny-adiwijaya closed 3 years ago
Hi @benny-adiwijaya , You can move those static files out of the wwwroot folder, and store it somewhere that users can only access via a Controller. Did I understand your question properly?
Allright thats work, thank you
Hi @trannamtrung1st, moving those static files out of the wwwroot folder can prevent direct access to files from URL, unfortunately the preview command is not working. So, how to prevent direct access to files from URL eventhough those static files are inside wwwroot folder just like in your demo project?
Hi @benny-adiwijaya , do you have any idea why the preview didn't work?
I think because preview is handled by elFinder client only and not by controller so when I try to preview I get status code 404 not found. Is there any solution?
Hi, it seems we need some extra works. I already encapsulated a default behavior in the package elFinder.Net.AspNetCore and released v1.2.6. You can use your own logic since it is not too complicated. Please see the Advanced Demo project. There are some updates in the Startup class and FilesController.
Hi @trannamtrung1st, thank you it works. but with video preview I can't forward or rewind.. can it be fixed?
Hi, thanks for pointing that out. According to Microsoft doc, I published a minor release 1.2.6.1 of the AspNetCore package. Just update the package and it will work.
Hi,
In your demo project I noticed that user cant access files from url, thats good. I try to create new project with blazor wasm and using this library but cant prevent direct access to files from URL. So, is there any configuration to prevent direct access to files from URL?