I’m encountering a problem with file upload in PHP. I’m using Dropzone.js which calls a PHP script.
The PHP environment runs on Docker, and the PHP version is : 7.2.28
When I upload an image with Firefox 72 on Mac OSX, I get this in $_FILES :
Array\n(\n [file] => Array\n (\n [name] => image.png\n [type] => \n [tmp_name] => \n [error] => 3\n [size] => 0\n )\n\n)\n,
According to the documentation: error 3 means UPLOAD_ERR_PARTIAL.
The problem happens only with Firefox on Mac OSX, with PNG images with this specific size (158ko).
Other file size (even tiny or big files), other browsers, other file types, or other operating systems work fine.
The docker image runs on 3 different servers, and the problem happens on each installation.
I tried some solutions that I read on the internet, but none of them worked:
- php_sapi_name() returns apache2handler
- I tried to add 'Accept-Ranges: none' to my php file.
Do you have a clue on what might happen?
Thanks in advance,