如何处理100MB上传用户如何处理、上传、用户、MB

2023-09-04 23:05:01 作者:风月皆好看

我一直在接洽创建一个定制的FTP应用程序,用户为了能够上传视频文件(最多100MB)下载。

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).

他们希望它是白痴证明(即容易让非计算机识字的人)。我假设,建立类似的FileZilla的FTP应用程序与他们的用户名和密码将太多舒展对于大多数用户。 在跨平台(哎哟)

当然,我不是说已经接近了如何使用户能够上传大文件问​​题的第一人。想知道如果任何人都可以给我任何提示。

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.

推荐答案

(是否是FTP?FTP有当然的密码是明文的防火墙,ASCII模式和麻烦。)

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

许多语言都提供FTP库,你可以串起来用少量的UI胶水,使自己的简单上传应用程序。例如Python有标准库的FTPLIB。上次我这样做是在C中与普福的FTPLIB,例如,但现代的脚本语言会更容易编写的,如果你不介意打包的应用程序与跨preTER的开销。

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.

您有.NET在你的标签...有没有FTP在标准类库,.NET当然您也可以免费下载的第三方库。另外你说的跨平台的,所以我不知道,如果你真的在谈论.NET客户端。

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.

你可以做的是提供上传的多种方式,例如基本的HTTP *文件上传内置到你的网站,其中每个人都知道怎么用,和一个标准的[S?]为高级用户的FTP接口谁都会能够运行FTP客户端。这并不是说经营FTP客户端是真的的是的困难:只告诉他们一个ftp贴:// URL到Windows资源管理器中,大多数人应该就没事了。

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.

*:最理想的是采用AJAX的反馈,让用户知道如何为自己的上传是怎么回事,和/或者一个Flash上​​传。要记住,关闭/打开任何脚本超时规则在服务器上,因此它不会中途放弃通过上传。 HTTP上传永远是最佳的100MB秩序的文件,但你肯定可以提高浏览器在这里默认的,而蹩脚的反应迟钝。

*: 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.