高效可靠的增量式HTTP多文件(或整个目录)上传软件
想象一下您有一个网站想要发送大量数据。假设 40 个文件总计相当于 2 小时的上传带宽。您预计一路上会出现 3 次连接丢失(想想:移动数据连接、WLAN 与微波)。您不会费心一次又一次地重试。这应该是自动化的。中断不应导致不必要的数据丢失。重试完整的文件会浪费时间和带宽。
那么问题来了:是否有一个软件包或框架,可以
- 通过 HTTP 将本地目录(内容)同步到服务器,
- 是多平台的(Win XP/Vista/7、MacOS X、Linux),
- 可以作为一个整体交付自包含的可执行文件,
- 在网络连接中断或客户端重新启动后恢复部分上传文件,
- 可以在服务器上生成以包含身份验证令牌和上传目标,
- 可以使使用变得超级简单
,或者构建一个的好方法是什么?
到目前为止我找到的选项:
rsync
的整洁打包。这需要服务器端有一个了解权限系统的 rsync(服务器)实例。- 自定义 Flash 程序。据我了解,Flash 10 能够将本地文件读取为字节数组(表示 这里)并且显然能够与原始服务器进行 HTTP 通信。参见问题 1344131(“将图像缩略图上传到服务器,无需上传整个图像”)。
- 适用于每个平台的自定义本机应用程序。
感谢您的任何提示!
相关工作:
- HTML5 将允许上传多个文件或至少选择“一次”上传多个文件。例如,参见此处。这与本地文件无关,并且不具有恢复失败上传的功能。
- 实现客户端多文件上传服务的有效方法 基本上要求 SWFUpload 或 YUIUpload (基于 Flash 的多文件上传器,否则“愚蠢”)
- A 问题 997253 的评论建议 JUpload -我认为使用Java小程序至少需要用户授予额外的权限,以便它可以访问本地文件
- GearsUploader 看起来很棒,但需要 Google Gears - 这很快就会消失
Imagine you have a web site that you want to send a lot of data. Say 40 files totaling the equivalence of 2 hours of upload bandwidth. You expect to have 3 connection losses along the way (think: mobile data connection, WLAN vs. microwave). You can't be bothered to retry again and again. This should be automated. Interruptions should not cause more data loss than neccessary. Retrying a complete file is a waste of time and bandwidth.
So here is the question: Is there a software package or framework that
- synchronizes a local directory (contents) to the server via HTTP,
- is multi-platform (Win XP/Vista/7, MacOS X, Linux),
- can be delivered as one self-contained executable,
- recovers partially uploades files after interrupted network connections or client restarts,
- can be generated on a server to include authentication tokens and upload target,
- can be made super simple to use
or what would be a good way to build one?
Options I have found until now:
- Neat packaging of
rsync
. This requires an rsync (server) instance on the server side that is aware of a privilege system. - A custom Flash program. As I understand, Flash 10 is able to read a local file as a bytearray (indicated here) and is obviously able to speak HTTP to the originating server. Seen in question 1344131 ("Upload image thumbnail to server, without uploading whole image").
- A custom native application for each platform.
Thanks for any hints!
Related work:
- HTML5 will allow multiple files to be uploaded or at least selected for upload "at once". See here for example. This is agnostic to the local files and does not feature recovery of a failed upload.
- Efficient way to implement a client multiple file upload service basically asks for SWFUpload or YUIUpload (Flash-based multi-file uploaders, otherwise "stupid")
- A comment in question 997253 suggests JUpload - I think using a Java applet will at least require the user to grant additional rights so it can access local files
- GearsUploader seems great but requires Google Gears - that is going away soon
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论