高效可靠的增量式HTTP多文件(或整个目录)上传软件

发布于 2024-08-28 04:16:48 字数 1738 浏览 4 评论 0原文

想象一下您有一个网站想要发送大量数据。假设 40 个文件总计相当于 2 小时的上传带宽。您预计一路上会出现 3 次连接丢失(想想:移动数据连接、WLAN 与微波)。您不会费心一次又一次地重试。这应该是自动化的。中断不应导致不必要的数据丢失。重试完整的文件会浪费时间和带宽。

那么问题来了:是否有一个软件包或框架,可以

  1. 通过 HTTP 将本地目录(内容)同步到服务器,
  2. 是多平台的(Win XP/Vista/7、MacOS X、Linux),
  3. 可以作为一个整体交付自包含的可执行文件,
  4. 在网络连接中断或客户端重新启动后恢复部分上传文件,
  5. 可以在服务器上生成以包含身份验证令牌和上传目标,
  6. 可以使使用变得超级简单

,或者构建一个的好方法是什么?

到目前为止我找到的选项:

  • rsync 的整洁打包。这需要服务器端有一个了解权限系统的 rsync(服务器)实例。
  • 自定义 Flash 程序。据我了解,Flash 10 能够将本地文件读取为字节数组(表示 这里)并且显然能够与原始服务器进行 HTTP 通信。参见问题 1344131(“将图像缩略图上传到服务器,无需上传整个图像”)。
  • 适用于每个平台的自定义本机应用程序。

感谢您的任何提示!

相关工作:

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

  1. synchronizes a local directory (contents) to the server via HTTP,
  2. is multi-platform (Win XP/Vista/7, MacOS X, Linux),
  3. can be delivered as one self-contained executable,
  4. recovers partially uploades files after interrupted network connections or client restarts,
  5. can be generated on a server to include authentication tokens and upload target,
  6. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文