UniSharp / laravel-filemanager

Media gallery with CKEditor, TinyMCE and Summernote support. Built on Laravel file system.
https://unisharp.github.io/laravel-filemanager/
MIT License
2.04k stars 718 forks source link

new Valid Mime types and should validate false not working from config #555

Open davemuir opened 6 years ago

davemuir commented 6 years ago

When I try to upload something other than a standard image file, it looks like no matter what mime type is specified in 'valid_file_mimetypes', the uploader will not complete the upload. I either get "invalid upload request" or "You can't upload files of this type."

If I can override the validation for now by setting 'should_validate_mime' => false (default), then that is a start, but this config option does not seem to do that.

In a more specific sense, my goal is to have the file uploader only handle .obj and .fpx files. Adding these to the valid_file_types did not work either: 'text/plain', 'application/vnd.fpx', 'application/vnd.netfpx', 'image/x-fpx', 'image/fpx', 'image/vnd.fpx', 'image/vnd.fastbidsheet', 'application/octet-stream', 'application/vnd.ms-pkistl', 'application/x-pkcs7', 'application/x-sh', 'application/x-bsh', 'application/wavefront-obj', 'application/object',

stefichu commented 6 years ago

Same here! I want to upload .html files, I tried this process, doesn't work.. help please!

pandeptwidyaop commented 6 years ago

SAME HERE

host9999 commented 4 years ago

me too, may be hacker upload .php file to server and.... :(

richievc commented 3 years ago

Seems like this a long-running problem. Has anyone found a solution? Thanks