google-app-engine - 谷歌应用引擎 Blobstore : how to ensure browser shows progress and total size of a download?

标签 google-app-engine blobstore

当我从 blobstore 提供下载服务时,我注意到浏览器没有显示总大小和剩余时间,下载一直持续到完成,但浏览器似乎不知道总大小是多少预期。

注意:

  • 这只发生在 appspot.com 的生产服务器中。在开发环境(本地主机)中,一切按预期工作,浏览器显示总大小、完成百分比和大约剩余时间...

  • 我尝试将 header “Content-Length”设置为 blob 大小,但没有成功。

  • 在分析下载的 blob 的 header 时,Content-Length header 不存在(即使我在使用“send_blob”之前写了它)。标题是这样的:

HTTP/1.0 200 正常 =>
缓存控制 => 无缓存
内容处置 => 附件; filename="Setup.exe"
到期 => 1990 年 1 月 1 日星期五 00:00:00 GMT
Content-Type => application/octet-stream
日期 => 2011 年 3 月 31 日星期四 20:19:52 GMT
服务器 => 谷歌前端

有人知道如何让浏览器显示总大小、下载百分比和估计剩余时间吗?

最佳答案

除了主演this issue,你无能为力。 .

问题如下:

  1. BlobInfo类没有文件大小属性。

  2. send_blob函数,具有 BlobInfo作为参数,不能设置 Content-Length HTTP 响应 header 。

  3. Content-Length标题 can't be modified by the application在 GAE 上。

关于google-app-engine - 谷歌应用引擎 Blobstore : how to ensure browser shows progress and total size of a download?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5505833/

相关文章:

javascript - 使用 JavaScript 加密模块代替 SSL/HTTPS

java - App Engine Mapreduce Java无法编译MapReduce Specification.of

python - 如何解决 "[Errno 13] file not accessible"错误?

java - 如何从谷歌驱动器读取大文件到 gae blobstore

php - 如何解决从 App Engine 生成的 'Request was aborted after waiting too long to attempt to service your request error'

google-app-engine - 寻找 Google App Engine 的非规范化建议

flash - 如何处理多人游戏 Facebook 应用程序项目?

java - GAE Blob Store 获取文件大小

java - GAE : How is it possible to access data/files that are stored in the GAE Blobstore by an external Web Service that is not deployed on GAE using Java

java - 如何从谷歌应用引擎(java)将图像检索到jsp中