Python 中的 AJAX 上传(WSGI),无需 Flash/Silverlight,带进度条

发布于 2024-08-01 12:57:41 字数 341 浏览 3 评论 0原文

我正在寻找一个纯 Javascript/Python 上传示例,它使用服务器轮询而不是客户端 SWF 来显示上传进度(例如rapidshare.com 上的上传进度)

目前,网站正在 Werkzeug 附带的独立 wsgi 服务器上运行框架,但如果负载增加,可能会移动到 mod_wsgi。

我尝试过 gp.fileupload 中间件,但无法让它工作。 他们网站上的示例也不起作用:|

网站已经使用 Glow 库来处理其他杂项客户端内容,但没有具体上传- 其中的相关功能。

I am looking for a pure Javascript/Python upload example, that uses server polling instead of client-side SWF to display upload progress (like the one on rapidshare.com for example)

Currently, website is running on the standalone wsgi server included with Werkzeug framework, but may be moved to mod_wsgi if the load increases.

I've tried the gp.fileupload middleware, but can't get it to work. Examples on their website wont work either :|

Website already uses Glow library for other misc client-side stuff, but there is no specific upload-related functionality in it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空心空情空意 2024-08-08 12:57:41

如果您在网络端不支持跟踪上传数据到达时的临时文件(或内存缓冲区)的大小,我不知道您将如何做到这一点。 一些流行的网络服务器对此有特殊支持,大部分是实验性的,但它没有得到广泛的支持,而且你想要做的事情一般来说是相当尴尬的。 我最近对此进行了研究,但它的支持很差。

If you don't have support on the web side to track the size of the temporary file (or in-memory buffer) of the uploading data as it arrives, I don't know how you'll do this. Some of the popular web servers have special support for this, mostly experimental, but it's not widely supported and what you're trying to do is pretty awkward in general. I've researched this recently and it's pretty poorly supported all around.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文