I can confirm that
upload_max_filesize is the maximum size for a single file.
upload_max_filesize=2M, you can upload 3 files of
I just confirmed this by testing.
Limits you should care about:
2M): max size per individual file;
20): max number of files you can send per request;
8M): max raw POST data size per request;
post_max_sizemust be greater than the sum of the sizes of:
- all uploaded files
- all data in other POST fields
- a few extra KB to account for the
multipart/form-dataoverhead (headers/boundaries) that wrap every single file and every single POST field in the payload.
Be really careful with these limits, as PHP will not error if you exceed one of these limits; instead, you’ll end up with partial or empty
$_FILES and might have a hard time debugging the issue.
max_file_uploads will silently ignore any file past the
nth uploaded file, and you’ll end up with a truncated list of files with no warning whatsoever.