-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Deny mime type before uploading? #1525
Comments
Also, to add to this (unless there is a solution already) can we check file extensions, rather then mime types? I want to allow users to add their own extensions to a deny list in a backend system, but they might not know the exact mime type for a particular file extension. |
We plan to use the MIME type of the type property of the browser of file objects. It does not check when the MIME type can not be acquired. |
Is there anyway to use the client option For example, I want to hide files with extension |
e.g. in accessControl call back function if ($attr === 'hidden') {
if (preg_match('/\.exe$/i', $path)) {
return true;
}
} |
How will the new check work? Is it a client option? And when will it be ready to roll out? :) |
Currently, to disallow a mime type, the file has to be upload to the server first then it comes back saying the file type is not allowed.
This is useless for huge files, as I need to be able to have elFinder inform the user that the mime type is not allowed after then select a file, before it gets uploaded.
I cannot use the client option
onlyMimes
as the list is huge and allowed types may change quickly and frequently. I only need to stop certain ones e.g .exeIs this possible?
The text was updated successfully, but these errors were encountered: