Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google AppEngine Blobstore: how to ensure browser shows progress and total size of a download?

When I serve a download from the blobstore, I notice that the browser does NOT show the total size and time remaining, the download goes on until it's complete, but the browser seem to have no idea of how the total size which is expected.

Note that:

  • This only happens in the production server, at appspot.com. In the development environment (localhost) things work as expected, the browser shows the total size, percent done, and the approx time remaining...

  • I tried to set the header 'Content-Length' to the blob size, no luck.

  • When analyzing the headers of a downloaded blob, the Content-Length header is absent (even if I wrote it before using "send_blob"). The headers are like this:

HTTP/1.0 200 OK =>
Cache-Control => no-cache
Content-Disposition => attachment; filename="Setup.exe"
Expires => Fri, 01 Jan 1990 00:00:00 GMT
Content-Type => application/octet-stream
Date => Thu, 31 Mar 2011 20:19:52 GMT
Server => Google Frontend

Anybody has any idea on how to make the browser show the total size, percent downloaded, and estimated remaining time?

like image 226
MarcoB Avatar asked Mar 31 '11 20:03

MarcoB


1 Answers

You can't do anything about it, except starring this issue.

Here are the problems:

  1. The BlobInfo class does not have a file size attribute.

  2. The send_blob function, having a BlobInfo as parameter, can't set a Content-Length HTTP Response header.

  3. The Content-Length Header can't be modified by the application on GAE.

like image 152
systempuntoout Avatar answered Nov 12 '22 14:11

systempuntoout