Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to get to partially uploaded files?

I need to save the uploaded file even if the connection fails at some point (if it fails, then save as much as was uploaded). Is there a way in PHP to get to that part of a file, that was uploaded before (e.g.) the connection to the server has failed? (when there is an UPLOAD_ERR_PARTIAL error in $_FILES['file']['error'])

like image 308
Mateusz Avatar asked Jun 25 '15 12:06

Mateusz


1 Answers

As already suggested in the comments, it's is not worth wasting your time trying to do some magic with PHP.

HTML5 already supports chucked file uploads, it would be a much better approach to use some sort of JavaScript library or something else that relies on this technology. I can recommend FlowJS (the demo speaks for itself), but if you don't like it - I am pretty sure there are plenty more around the web with the same functionality.

like image 87
Avalanche Avatar answered Nov 01 '22 04:11

Avalanche