I am inserting images using Google Cloud Storage JSON API as shown in this sample, that needs to be shared publicly with read permissions. HTTP request looks like this:
var request = gapi.client.request({
'path': '/upload/storage/v1beta2/b/' + BUCKET + '/o',
'method': 'POST',
'params': {'uploadType': 'multipart'},
'headers': {'Content-Type': 'multipart/mixed; boundary="' + boundary + '"'},
'body': multipartRequestBody});
My bucket already has 'Reader' permission for 'All Users', but inserted objects don't inherit that property. Following URL throw access denied till I click on 'Share Publicly' checkbox. http://commondatastorage.googleapis.com/bucketname%2Ffilename
I need those image to be available as soon as inserted. Is there a way to share as part of HTTP insert request?