Issue with Google Cloud Storage resumable upload URL from App Engine -
we use resumable upload mechanism in google cloud storage upload files app engine described on: https://developers.google.com/storage/docs/json_api/v1/how-tos/upload#resumable nice feature it's possible make gcs generate upload urls app engine uploadid making possible use url directly client without need sign url. works when adding gae service account gcs api project member.
this mechanism worked long time, since today stopped working following error (http 403):
"domain": "usagelimits", "reason": "accessnotconfigured", "message": "access not configured. please use google developers console activate api project."
so we're little bit lost now. related gcs incident (incident report gcs error rate spike march 4th)?
find below important part of code we're using make first post (which working before):
string url = "https://www.googleapis.com/upload/storage/v1beta2/b/"+bucketname+"/o?uploadtype=resumable"; connection.setrequestmethod("post"); connection.setrequestproperty("x-upload-content-type", contenttype); string json = "{\"name\":\""+objectname+"\"}"; connection.setrequestproperty("content-length", string.valueof(json.getbytes("utf-8").length)); connection.setrequestproperty("content-type", "application/json"); list scopes = new arraylist<>(); scopes.add("https://www.googleapis.com/auth/devstorage.full_control"); appidentityservice.getaccesstokenresult accesstoken = appidentityservicefactory.getappidentityservice().getaccesstoken(scopes); connection.setrequestproperty("authorization", "bearer "+accesstoken.getaccesstoken());
to fix need enable 'json gcs api' on app engine project (the gcs buckets part of different project json gcs api enabled). unfortunately we're not able enable api switch, since app engine project still 'old style' project without apis menu in google developers console.
to able enable apis on app engine project need activate 'cloud integration' on app engine settings page. (this creates google cloud project google cloud storage bucket , new style service account application.)
unfortunately failing every time with: "an error occurred when creating project. please retry."
we've entered bug this: https://code.google.com/p/googleappengine/issues/detail?id=10906 google able out this..
Comments
Post a Comment