Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload folder location configuration #324

Open
wxrl opened this issue Aug 10, 2022 · 1 comment
Open

Upload folder location configuration #324

wxrl opened this issue Aug 10, 2022 · 1 comment

Comments

@wxrl
Copy link

wxrl commented Aug 10, 2022

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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants