asagura
asagura

Reputation: 141

upload images to google cloud storage via PHP from LAMP on compute engine

Currently I'm able to upload images to my web service and it stores them on the persistent disk but I want to save them in a bucket on GCS instead.

If someone who has done it before or know of examples using php to upload, please help.

Upvotes: 2

Views: 530

Answers (1)

Ashish Awasthi
Ashish Awasthi

Reputation: 1327

Best way to do this is to bypass your server and let users upload the files directly to GCS. It avoids long running requests on your server, so you can scale better (and also saves cost). A good working sample is in the dev docs

If you still want to stream through your server, use PHP client library

Upvotes: 1

Related Questions