ZF2FileUploadExamples icon indicating copy to clipboard operation
ZF2FileUploadExamples copied to clipboard

Resuming an upload

Open teseo opened this issue 11 years ago • 2 comments

Hello,

I'm pretty much a newbie in Zf2 (I think is awesome!). I am expecting my users to upload big files and I was wondering what's your recommendation within zf2 to allow users to resume an upload in case of browser crash, lost of connection, etc.

I understand of all your samples and they look great but I can't find a way to resume an upload. I did read all the documentation and I couldn't find how to do it. Maybe not supported?

Cheers!

teseo avatar Apr 29 '14 11:04 teseo

Great question. I haven't done chunked uploads yet personally with PHP, but these links may give some ideas: https://hacks.mozilla.org/2011/04/resumeupload/ https://github.com/blueimp/jQuery-File-Upload/wiki/Chunked-file-uploads

It looks like you can potentially read the file in the browser, slice it up into chunks, and do individual uploads of each chunk to the server. Server-side would be responsible for concatenating the uploaded parts.

Also, some cross-browser ways of slicing the file: http://stackoverflow.com/questions/6605264/blobs-slice-method-works-incorrectly-in-chrome

Hope this helps!

cgmartin avatar May 01 '14 23:05 cgmartin

That is brilliant, is worth to give a try!

Cheers!

teseo avatar May 09 '14 19:05 teseo