简体   繁体   中英

Protocol for a desktop based file uploader

I am trying to build a large file uploader. Currently I am using swfupload and nginx + rails and I am able to upload a file as large as 1 GB before running into problems. After 1 GB, depending on OS, swfuploader starts locking up or just starts throwing 500 errors.

I noticed that Vimeo offers 2GB uploads using a desktop uploader. Flickr has something similar too (and I think they support pausing the uploads). What protocol can be used for such a desktop uploader? Can FTP be used for this?

Thanks Prateek

Na, I would not use FTP for this, for the following reasons:

  • FTP is evil and should die (active/passive connections, unencrypted credentials)
  • Doing proper handling of security would be complex. You cannot use a single account for everything (as the credentials will need to be embedded in your client-side software), so you would need an FTP server which can authenticate against your web application's user database (possible, but longwinded)
  • You would need to write some integration between your app and your FTP server

You could handle this using a custom simple protocol. I don't know if doing it over HTTP would be efficient, but if it was, you would just need to POST parts of your file and handle it server-side. Just make sure you allow partial uploading. It should be pretty simple to implement.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM