1

I am trying to write an image file in google app engine but getting an error "filesystem is read only". I checked for other option including "temp" folder and storage bucket. I cannot use temp folder due to this reason: "Files can be temporarily written to /tmp. Note that files written to /tmp may not be available across subsequent requests to your app." For saving in bucket first I need to write in image format, only then I will be able to upload in bucket. Is there any solution for writing base64 as image file in app engine?

Ravi
  • 9
  • 2

1 Answers1

1

The recommended way for this is using Cloud Storage in order to save and serve your static files. As App Engine creates and deletes instances as it is needed in order to serve the traffic for your application, if you write the content on the instance, it would be lost, or you would not be able to access it if the request landed on an instance which doesn't hold the data.

I would recommend you to go in the path of converting your image in your applications code and then writing the content to the bucket, or stream the data directly if possible. You can find more information about how to serve and send data to a bucket from App Engine here.

Hope you find this information useful.

rsalinas
  • 156
  • 3