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

Mime Type for zip not working #107

Open
waqashassan98 opened this issue Dec 13, 2019 · 1 comment
Open

Mime Type for zip not working #107

waqashassan98 opened this issue Dec 13, 2019 · 1 comment

Comments

@waqashassan98
Copy link

The library is not validating zip files. Am I doing something wrong? Here is my code:

'zipfile' => 'required_if:media_type,Art Work,Manuals,Sell Sheets,Warnings,Warranties|uploaded_file:0,50M,zip,rar,7zip',

also tried
'zipfile' => 'required_if:media_type,Art Work,Manuals,Sell Sheets,Warnings,Warranties|uploaded_file:0,50M|mimes:zip',

also tried
'zipfile' => 'required_if:media_type,Art Work,Manuals,Sell Sheets,Warnings,Warranties|uploaded_file:0,50M,application/x-rar-compressed,application/octet-stream,application/zip,application/x-zip-compressed,multipart/x-zip',

Thanks

@alexantr
Copy link

alexantr commented Sep 9, 2021

Property $mimeTypes in MimeTypeGuesser contains only 'application/zip' for zip extension. More mimes like 'application/x-zip-compressed' must be added to $mimeTypes.

Or MimeTypeGuesser can have ability to extend $mimeTypes by user, for example $validator->addMimeType('application/x-zip-compressed', 'zip');

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

No branches or pull requests

2 participants