Search code examples
javagoogle-app-enginerenameblobstore

How to set filename property in BlobStore (Java)?


It is possible to rename a file stored in Blobstore? but if this is not possible, how could clone a saved file with another filename?

thanks.


Solution

  • Blobstore entities are immutable - once created, they cannot be changed.

    You would need to create a new entity and copy the data. Since programmatic access to Blobstore has been deprecated, you should save blobs to Cloud Storage and then access them via Blobstore API: when saving data to Cloud Storage, save the key you get and simply use it with Blobstorage APIs.