FriendsOfFlarum / upload

The file upload extension with insane intelligence for your Flarum forum.
https://discuss.flarum.org/d/4154
MIT License
175 stars 94 forks source link

Upload folder location configuration #324

Open wxrl opened 1 year ago

wxrl commented 1 year ago

Currently the uploaded files are stored under flarum_root/public/assets/files/yyyy-mm-dd/uploaded_file

It would be better to move (or at least let the administrator to customize) the location to e.g. flarum_root/storage/assets/files/yyyy-mm-dd/uploaded_file to avoid direct access via HTTP server.

clarkwinkelmann commented 1 year ago

This is unlikely to be added outside of an important refactor.

The current implementation relies on the files being accessible through HTTP, including for the access protection which uses an internal request to retrieve the file. It's implemented that way so that the same implementation can work with any file driver.

You should be able to customize the path to the local folder using PHP code and a service provider, but the new path will still need to be under the public folder or have a web-facing address for the extension to work.