Topic: When to use chunking and when not?

I was wondering when to use chunking and when not? I prefer not to use chunking. But I read that some browsers don't work on multi_part so is there a possibility that plupload auto detects when to use chunking?

Re: When to use chunking and when not?

Plupload will definitely have that feature (working on it), but doesn't have it right now. Historically chunking was introduced to overcome file size limit on the server - by decreasing the chunk size, one could easily pipe the file, that would otherwise fail to constraints, to the server part by part and reassemble safely on the other side.

But as the time went by and html5 came into play, idea of chunking changed a bit. Now it is required feature for uploading very big and huge files (of around several gigabytes at least). Without chunking browser might simply run out of memory and hang (best case). While browser producers are working on this issue, we have to use chunking to work around this problem.

In general chunking would be a very good and actually recommended thing to do by us, if not Flash runtime. Problem with Flash is that it doesn't allow access to raw file source and streaming upload (without preloading the file in memory) at the same time. So here's the paradox - to create a chunk we have to preload the file in memory first, but this operation will successfully ruin the purpose of chunking in first place!.. But still possible to overcome server limitation on file size this way.

So to summarize - use chunking if:

  1. you got to overcome server limitation on file size

  2. you will be uploading huge files, over 1gb (but be sure to omit Flash from list of potential runtimes)

  3. you want to get smoother and more consistent upload progress across runtimes (but this will obviously slow down the upload itself, since there will be more work to do for each file)

Do not use chunking if:

  1. you need to upload huge files and absolutely require Flash to be in the list of fallback runtimes (in default mode Flash streams file directly from the disk, without preloading it in memory; other runtimes may survive this mode as well)

If you want to see your issue fixed, do not report it here, do it on - GitHub.

Re: When to use chunking and when not?

That's a very clear answer, thanks. I have another question but then regarding to multipart. I read the following in the docs:
-------------------
multipart
Boolean state if the files should be uploaded using mutlipart instead of direct binary streams. Doesn't work on WebKit using the HTML 5 runtime.
-----
multipart_params
Object name/value collection with arguments to get posted together with the multipart file.
---------------------------------

When should I use multipart and can I use multipart_params with the multipart disabled? So can I pass in variables to the upload without using multipart? What is the best option to use for this one.

Re: When to use chunking and when not?

Thanks @davit. I am new to this forum. I was facing the same problem and was looking for the answer. Your answer is really helpful.

Re: When to use chunking and when not?

davit wrote:

Plupload will definitely have that feature (working on it), but doesn't have it right now. Historically chunking was introduced to overcome file size limit on the server - by decreasing the chunk size, one could easily pipe the file, that would otherwise fail to constraints, to the server part by part and reassemble safely on the other side.

But as the time went by and html5 came into play, idea of chunking changed a bit. Now it is required feature for uploading very big and huge files (of around several gigabytes at least). Without chunking browser might simply run out of memory and hang (best case). While browser producers are working on this issue, we have to use chunking to work around this problem.

In general chunking would be a very good and actually recommended thing to do by us, if not Flash runtime. Problem with Flash is that it doesn't allow access to raw file source and streaming upload (without preloading the file in memory) at the same time. So here's the paradox - to create a chunk we have to preload the file in memory first, but this operation will successfully ruin the purpose of chunking in first place!.. But still possible to overcome server limitation on file size this way.

So to summarize - use chunking if:

  1. you got to overcome server limitation on file size

  2. you will be uploading huge files, over 1gb (but be sure to omit Flash from list of potential runtimes)

  3. you want to get smoother and more consistent upload progress across runtimes (but this will obviously slow down the upload itself, since there will be more work to do for each file)

Do not use chunking if:

  1. you need to upload huge files and absolutely require Flash to be in the list of fallback runtimes (in default mode Flash streams file directly from the disk, without preloading it in memory; other runtimes may survive this mode as well)


Thanks for the reply man.. Very clearly answered. A very helpful post I must say. This is the first time I have visited here & found so many interesting stuff on this forum. Thanks for such a great post. Keep posting and updating the people.
Anyway Happy new year smile

Regards,
Master SS

Re: When to use chunking and when not?

buy your real and fake visa passport and other documents  we the best contact us for more details  on borismbianda@gmail.com