Once you upload a file to the blobstore, it renames it something like "s9QmBqJPuiVzWbySYvHVRg==". If you navigate to its "/serve" URL to download the file, the downloaded file is named this jumble of letters.
Is there a way to have the downloaded file retain its original filename when uploaded?
The code that you refer to is the key of the BlobInfo entity, but the original filename is stored as property.
If you want a simple way to download a file by its filename you can use this code that I use for my ServeHandler, it works for my needs, download a file by its filename instead of blobstore key:
In the GAE admin console, BLOB viewer section, when you view an individual BLOB there is a download button on the bottom right of the viewer, as shown in the screenshot below.
When the file is uploaded using the
BlobUploadHandler
the original filename is stored as name property in the newly createdBlobInfo
entity.In the blob serve handler, you can specify that the blob should be returned as download attachment, and you can specify with what name should it be saved with