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

Check MIME type & file size before upload #353

Open
tipa opened this issue Oct 23, 2023 · 0 comments
Open

Check MIME type & file size before upload #353

tipa opened this issue Oct 23, 2023 · 0 comments

Comments

@tipa
Copy link

tipa commented Oct 23, 2023

Feature Request

In my forum, I only want to allow image uploads (which are uploaded using the imgur adapter), so that no uploads are stored on my servers

image

At the moment, when the user uploads a file (either using drag & drop or copy-paste or manually using the file-picker), the file is uploaded first, and then it is checked if it exceeds the maximum file size or is of a MIME type that isn't supported

Is your feature request related to a problem? Please describe.

The reason I am submitting this feature request is that files of (failed and potentially very large) uploads are still stored in the /storage/tmp folder and fill up space on my webserver, which is what I want to avoid (that is the reason I am only allowing image files through the imgur adapter and don't want to store any uploads on my server)

Describe the solution you'd like

The plugin gathers as much information as it can as soon as possible to decide if an upload is possible to would error out anyways. For example, I would assume that when a file is selected with the file-picker, the file size could be queried before the upload process starts.
Perhaps the MIME type can be determined based on the file extension. If that is not possible, maybe an additional option for admins to blacklist/whitelist file extensions would help

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

1 participant