1
votes

I'm trying to read/write Laravel blade templates to a Google Cloud Storage bucket.

The compiled templates are correctly writing to the bucket, but when the view attempts to read the compiled template back out of the bucket I get the following error:

include(gs://my-site.appspot.com/views/c08e5794b1fc664fce0cd30fc8e7898e): failed to open stream: "\google\appengine\ext\cloud_storage_streams\CloudStorageStreamWrapper::stream_open" call failed

Why would the app be able to write to the bucket successfully but then fail to read back out?

1
Here you can find sample code to read/write GCS files and create serving url's for templates with or without a blob_key: github.com/voscausa/appengine-gcs-blobstore-python - voscausa
More specifically, it doesn't work because 'include' doesn't understand 'gs://' URLs. Using voscausa's link above you can create a serving URL which will work. - Adam

1 Answers

1
votes

If you need to include files from the bucket, add to your php.ini:

google_app_engine.allow_include_gs_buckets = "views"