try this
'product-zip' => 'required|mimes:zip|max:20000',
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I want to upload 20mb max file (type zip) i write the following validation
$this->validate($request, [
'product_zip' => 'required|mimes:zip|size:50000',
]);
i also have zip file which is
+files: FileBag {#47 ▼
#parameters: array:1 [▼
"product_zip" => UploadedFile {#32 ▼
-test: false
-originalName: "stock-icon-bulb.zip"
-mimeType: "application/x-zip-compressed"
-size: 16285787
-error: 0
path: "C:\xampp\tmp"
filename: "php8FAF.tmp"
basename: "php8FAF.tmp"
pathname: "C:\xampp\tmp\php8FAF.tmp"
extension: "tmp"
realPath: "C:\xampp\tmp\php8FAF.tmp"
aTime: 2020-09-07 10:05:50
mTime: 2020-09-07 10:05:50
cTime: 2020-09-07 10:05:50
inode: 0
size: 16285787
perms: 0100666
owner: 0
group: 0
type: "file"
writable: true
readable: true
executable: false
file: true
dir: false
link: false
linkTarget: "C:\xampp\tmp\php8FAF.tmp"
but it throw me validation error, what was wrong please advice.
Please or to participate in this conversation.