how to handle 100mb uploads for users

2019-05-28 18:47发布

问题:

i've been approached to create a bespoke ftp app that users will download in order to be able to upload video files ( up to 100mb).

  • they want it to be idiot proof ( ie easy for non-computer literate people ). I'm assuming that setting up an ftp app like FileZilla with their username and password would be too much of a stretch for most users.
  • cross platform ( ouch )

Surely i'm not the first person that has approached the problem of how to enable users to upload huge files. Wondering if anyone can give me any tips.

回答1:

(Does it have to be FTP? FTP have trouble with firewalls, ASCII mode and of course the password is in the clear.)

Many languages have FTP libraries available you could string together with a small amount of UI glue to make your own simple uploader app. For example Python has an ftplib in the standard library. Last time I did this was in C with Pfau's ftplib, for example, but modern scripting languages will be much easier to write in if you don't mind the overhead of packaging your app up with an interpreter.

You have .NET in your tags... there isn't FTP in the standard class library for .NET but you can certainly download third-party libraries freely. On the other hand you say cross-platform, so I'm not sure if you're really talking about .NET on the client.

What you could do is provide multiple means of upload, for example a basic HTTP* file upload built into your site, which everyone will know how to use, and a standard [S?]FTP interface for the advanced users who will be able to operate an FTP client. Not that operating an FTP client is really that difficult: just tell them to paste an ftp:// URL into Windows Explorer and most people should get on all right.

*: ideally using AJAX feedback to let the user know how for their upload is going, and/or perhaps a Flash uploader. And remember to turn off/up any script timeout rules on the server so it doesn't give up halfway through an upload. HTTP upload will never be optimal for files of the order of 100MB, but you can certainly improve the default rather crappy unresponsiveness of browsers here.



回答2:

Upload to where?

You could get everyone to install Dropbox and create a share from a business account that they all have access to.



回答3:

You might want to think about single-sign-on strategies if you don't want users to have to provide username and password.



回答4:

If user have to upload large file, look to have a kind of resume functionality.

Is FTP the only option? If you can implement something base on P2P (bittorrent) you could get resume and integrity functionality for large files.

Here's 2 like I got from googling bittorent library

http://sourceforge.net/projects/libbt/

http://www.codeproject.com/KB/cpp/FTKernelAPI.aspx



回答5:

While not FTP, you could try using swfupload to upload files through HTTP. We are using it for approx. 100mb file uploads on IIS and it works reasonably well.

Note that you have to set the maximum request size in web.config to 100 or more MB...



回答6:

Uploading 100mb files is no more complex than 1kb files. You must simply insure that the reciever (in this case the server) doesn't try to receive the entire file into memory. The server could write the data immediately to disk or into a db CLOB. The server reads from the input stream and writes to the output stream, with very little resources required.



回答7:

thanks guys, must say this was the most comprehensive response i've ever had in a forum.

Think i'll suggest 2 routes like bobince mentioned

1) http using SWFUpload (bh213), i've used it before. It's pretty easy to setup and has a good user experience

2) then offer an ftp option. Either using a browser or something like filezilla.



回答8:

How about building a simple Adobe Air app with JS and HTML I believe it now has a FTP socket capability. You could also use the build in DB to store the details of whats sent where, small footprint, cross platform and you can build it in what you feel best in (flash, flex, JS/HTML).

I have similar requirements and I am looking at using Adobe air and jQuery or Ext for the solution.



标签: .net ftp