2
votes

I am new here,
is there any good simple way to access "google cloud storage" object with "jQuery ajax"?

What I understand so far is it use REST and I had to setup my Request Headers and authorize the access with OAuth 2.0 or generate my signed URLs, and enable the "CORS on the Bucket" with "gsutil setcors".

I can't piece those information together to get a working sample. Can anyone kindly help to forward a link or a sample to:

1) Get an "object" (say testing.xml) inside a "bucket" (www.testing.com) with "Share Publicly" enabled with jQuery ajax (no authorization require)?

2) Put / delete / get the object inside a bucket which is not "Share Publicly" (and authorization is needed)?

Thanks a lot !!

1

1 Answers

2
votes

This is probably easier to do with the JSON api, which includes a JavaScript client library. Check it out: https://developers.google.com/storage/docs/json_api/