Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem serving blobs in GAE

Im currently building an web-app that allows users to upload content via blobstore and to later download it.

However, the servlet that takes care of the download is called BlobServiceServlet and whenever a user downloads a blob, the filename is changed to "BlobServiceServlet" and the extension is also changed sometimes to .bin. Does anyone know how to fix this problem?

like image 776
fernandohur Avatar asked Dec 27 '22 14:12

fernandohur


1 Answers

Add a "Content-disposition" header to the response.

See http://en.wikipedia.org/wiki/MIME#Content-Disposition for an example.

E.g., in the handler,

self.response.headers['Content-Disposition'] = 'attachment; filename=foo.doc'
like image 160
Dave W. Smith Avatar answered Jan 07 '23 18:01

Dave W. Smith