upload icon indicating copy to clipboard operation
upload copied to clipboard

Upload folder location configuration

Open wxrl opened this issue 3 years ago • 1 comments

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.

wxrl avatar Aug 10 '22 08:08 wxrl

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.

clarkwinkelmann avatar Aug 10 '22 21:08 clarkwinkelmann