Issues with chunked uploads and resuming chunked uploads

Upload core product.
Post Reply
Alok
Posts: 1
Joined: Wed Sep 29, 2010 11:39 pm

Issues with chunked uploads and resuming chunked uploads

Post by Alok »

We are evaluating your product since we have a need for supporting > 2GB uploads across multiple browsers and operating systems. We are using IIS7 and are basing our evaluation using the sample ASP.NET script hosted on your site. We've run into two issues that we have not been able to work around:

1. If you set httpmethod=PUT, chunksize=[whatever], and chunkmode=onflyrange, it seems like the applet will send the entire content of the file with each chunked PUT instead of the chunksize. For example, if I set the chunksize to 10mb and am uploading an 80mb file, each chunk is the entire 80mb file. If you leave the httpmethod as POST, it works correctly in that each chunked POST is the chunksize (10mb). If you leave the chunkmode as default value, it also works correctly (all chunked PUTS are the chunksize). This defeats the purpose of having chunked uploads.

2. I leave the chunkmode to default value (so that the chunked files are written to disk on the server), set resume=true, chunksize=[whatever], initiate an upload and cancel it halfway through. Let's say there are 8 chunks, chunks 1 - 3 have been completely written to disk, chunk 4 is halfway written, and chunks 5 - 8 are not written. When I resume the upload, the applet seems to reupload the entire contents of chunks 1 - 3 again, is smart enough to know chunk 4 is halfway done and only uploads the missing half, then uploads chunks 5 - 8. Is there a way to signal to the applet that chunks 1 - 3 are completed and do not need to be uploaded again?

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Issues with chunked uploads and resuming chunked uploads

Post by support »

#1 - Yes, chunking is not implemented with HTTP PUT as it's not needed. HTTP PUT supports any filesize. You have to use either HTTP PUT (no chunk) or HTTP POST with chunks. Does it make sense?

#2 - You can add:
<PARAM NAME="overwrite" VALUE="false">
<PARAM NAME="policy" VALUE="ignore">
to skip chunks already uploaded.
Another better solution would be:
<PARAM NAME="chunksize" VALUE="whatever">
<PARAM NAME="chunkmode" VALUE="onflyrange">
That's way all chunks are append to the final file on server-side.

Post Reply