one more thing,
i used httpfox to check the response header, and "content-length"
header is not sent in the response..

On May 15, 8:28 pm, Jaroslav Záruba <[email protected]> wrote:
> Hi
>
> --
> BlobInfoFactory blobInfoFactory = new
> BlobInfoFactory(DatastoreServiceFactory.getDatastoreService());
> BlobInfo blobInfo = blobInfoFactory.loadBlobInfo(blobKey);
> long blobSize = blobInfo.getSize();
> response.setHeader("content-length", new Long(blobSize).toString());
> --
>
> Is this what you mean?
>
> Regards
>   J. Záruba
>
>
>
>
>
> On Sat, May 15, 2010 at 6:38 PM, Guss <[email protected]> wrote:
> > Hi,
> > I'm using java in GAE and i recently started using Blobstore to serve
> > my application download file, the only "issue" that i have is that
> > when it serves the file
> > the size is not sent to the browser so it can't estimate the time for
> > the download to complete...
>
> > here is the piece of code that i use to serve the file:
> >                BlobstoreService blobstoreService =
> > BlobstoreServiceFactory.getBlobstoreService();
>
> >                Iterator<BlobInfo> iterator = new
> > BlobInfoFactory().queryBlobInfos();
>
> >                while(iterator.hasNext()) {
> >                  BlobInfo b = iterator.next();
> >                  if (b.getFilename().equals('myfile.exe'))
> >                          blobstoreService.serve(b.getBlobKey(),resp);
> >                }
>
> > is there a way to also send the file size to the browser while serving
> > the file?
>
> > thanks,
> > Oded.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-appengine%2Bunsubscrib 
> > [email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to