使用Python在后台下载文件
我有一个可用的 Python Web 应用程序,它可以根据用户的请求将文件下载到 Web 服务器中。这对于小文件下载来说效果很好,但是当用户请求更大的文件时,连接就会超时。所以,我想我需要在后台处理下载,但我不确定什么工具最适合这个。 Celery 似乎是对的,但我真的不想让它排队(下载必须立即开始)。你有什么建议?
I have got a working web application in Python that downloads a file into the web server upon a user's request. This works fine for small file downloads but when the user requests a larger file, the connection times out. So, I think I need to process the download in the background but I'm not sure what tool is most suitable for this. Celery seems to be right but I don't really want it to be queued(the download must start immediately). What would you suggest?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
超时时间由您决定,您可以将其延长。
无论如何,有很多 flash 或 AJAX 上传器,你只能服务器端 AFAIK
Timout duration is up to you, you could just make it longer.
Anyway there are plenty of flash or AJAX uploaders out there, nothing you can do only server side AFAIK