开发者

What's the best way to upload massive (20 - 30 gig) files from a client to a server?

This is the third edit to the question, and I've now removed the original text as it's clearly no longer relevant.

I need to write a client that will allow users to upload massive files to the server. AJAX and Flash appear to be out as they insist on reading the files into memory before submitting them. I've been looking around at pre-built applets but no开发者_JAVA技巧thing looks entirely promising.

Looking for advice on how to do this. The issue is both client and server side. PHP is probably not the best server side solution for gathering such files... for that matter does the server need to be 64bit to even address a file that's over 4gigs?

On the client, I'd prefer it be browser based, but am now thinking that maybe it's better to write it as a platform application (even though that's a lot more hassle).

Really, I'm open to anything, as long as it's relatively reliable.


There are tons of Flash uploaders already created that may already support your need or help you to get started, that are easy enough to Google. That said, for a multi-GB file uploader, you might want to consider designing an uploader that uploads large files in chunks obviously, and allows recovery in the event of a network disconnection...it would be terrible if I uploaded 1.9GB and then lost my connection with .1GB remaining to upload! In addition, on your PHP side, you would only be receiving much smaller chunks that might be easier to manage memory-wise. You could then combine all chunks together on the PHP side once all were received.

The Flash client side and the server side would need to interoperate with this kind of design. I.e. the server needs to understand your custom chunking protocol. You might want to consider client bandwidth saving approaches such as compressing the chunks that the Flash client then uploads, and then uncompressing those chunks on the server.

You might want to consider Flash local storage in order to make a robust "pause/continue" user process. For example, I upload 1/2 GB of a 2GB file, then my power goes out. It would be great for me to go back to the upload page, and have the Flash resume where I left off. Flash local storage might be the way to go to support that, http://www.macromedia.com/support/documentation/en/flashplayer/help/help02.html. You could use the local storage to track the user's local file path that they were uploading, and the chunk that was last successfully uploaded, for example.

If this is to be deployed in a secure environment, you may need to support authentication in your Flash client...depending on where you plan to deploy this.

Don't know if that helps at all for Flash ideas, just thought I'd chime in.

I don't know well a pure AJAX approach would work for multi-GB upload scenarios.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜