I have simple-page site on PHP, where users can upload file (stl-model).
At first I was use for upload JS FormData. It's work in Chrome and Firefox, but Safari iOS sometimes send file with size = 0 bytes.
JS console.log show, that file size 718120 bytes before send. PHP debug mode show that global $ _FILE exists and file name is true, but file is empty:
(
[name] => TRRSExtenderMount.stl
[type] => application / octet-stream
[tmp_name] => / tmp / phphDceFc
[error] => 0
[size] => 0
)
The error with size 0 repeats from time to time.
What I tried:
- checked phpinfo post_max_size, upload_max_filesize
- tested on different devices (all with 13.3.1 iOS)
- tested with different stl-files and file-size (from 0.5mb to 16mb)
- tested with 3g, 4g and wi-fi
- checked slow upload speed: check file size, wait 10 seconds and check it again
- changed input form for standart HTML with POST method without JS
But the error was repeated again. What am I doing wrong?