Multi-part Downloading/Uploading?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
claws
Forum Commoner
Posts: 73
Joined: Tue Jun 19, 2007 10:54 am

Multi-part Downloading/Uploading?

Post by claws »

Hey all,

I know about Multi-Part Downloading, which is used by all Download Accelerators. If the server allows it, just modification in the request header makes it possible to download multi threaded download using HTTP Multi-part downloading technology.

I was wondering, if we have anything like Multi-Part uploading in HTTP? I mean, a technology, to accelerate file uploads. Some times we may have to upload large files (say to google video, some file hosting sites). We have tons of file hosting sites. popular ones like Rapidshare & Megauploads have their own upload managers, which does upload a file with much more speed than uploading the browser upload. How is this possible? What is technology behind it? Is there any difference in the role of server side PHP script in either of these (browser & upload manager) uploading methods?

I was googling on this, but I didn't get any fruitful results. Please enlighten me on this.

Thank you.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Multi-part Downloading/Uploading?

Post by Weirdan »

claws wrote:I know about Multi-Part Downloading, which is used by all Download Accelerators.
Just a small correction: this is called partial downloads, not multipart. In context of HTTP (and, actually, MIME) multipart means sending several separate entities in response to one request.

From what I know, there's no direct support in HTTP to upload different parts of the same files simultaneously, but you can invent your own protocol extension quite easily.
claws
Forum Commoner
Posts: 73
Joined: Tue Jun 19, 2007 10:54 am

Re: Multi-part Downloading/Uploading?

Post by claws »

Thanks for the correction.
but you can invent your own protocol extension quite easily.
I'm wondering how? I'm not very clear about it. Downloading & UPloading are not the same. Downloading is much obvious. Use partial downloading then the download manager/client will merge them back into single file.

In case of uploading, would be the case? My php script merges them into one file?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: Multi-part Downloading/Uploading?

Post by Weirdan »

claws wrote:My php script merges them into one file?
Exactly. I envision something simple, like sending X-Upload-Part: 2/10 header to notify the script it's second part of 10 parts total. Once the script received the part (and it's actually when php starts executing) it checks if all other parts already received and, if they are, assembles entire file. You will need custom upload program able to split files in parts and send parts concurrently, of course (I believe you can use flash to do this).
Post Reply