Slingshot for google storage


#1

i have a slingshot configuration, this is work to s3 but i need to migrate a google storage. i have this

Slingshot.GoogleCloud.directiveDefault.GoogleSecretKey = Assets.getText('google-cloud-service-key.pem');

Slingshot.fileRestrictions( "myDefinedDirective", {
    allowedFileTypes: [ "image/png", "image/jpeg", "image/gif" ],
    maxSize: 1 * 1024 * 1024
});

Slingshot.createDirective( "myDefinedDirective", Slingshot.GoogleCloud, {
    GoogleAccessId: "00b4903a97ce39dcfd2fdcd89772b588fdf77d22f74b0a5e57ea9553ce88d4d7",
    bucket: "img_appengine",
    acl: "public-read",
    authorize: function () {
        return true;
    },
    key: function ( file ) {
        var user = Meteor.users.findOne( this.userId );
        return user.emails[0].address + "/" + file.name;
    }
});

i thinks, the problem its on GoogleAccessId, but i can’t find this value!.

the error is

edgee_slingshot.js:390 POST https://img_appengine.storage.googleapis.com/ 403 ()transfer @ edgee_slingshot.js:390(anonymous function) @ edgee_slingshot.js:294(anonymous function) @ edgee_slingshot.js:325(anonymous function) @ dynamics_browser.js:51_maybeInvokeCallback @ livedata_connection.js:446receiveResult @ livedata_connection.js:466_livedata_result @ livedata_connection.js:1631onMessage @ livedata_connection.js:274(anonymous function) @ stream_client_sockjs.js:172_.each._.forEach @ underscore.js:105self.socket.onmessage @ stream_client_sockjs.js:171REventTarget.dispatchEvent @ sockjs-0.3.4.js:87SockJS._dispatchMessage @ sockjs-0.3.4.js:1072SockJS._didMessage @ sockjs-0.3.4.js:1130that.ws.onmessage @ sockjs-0.3.4.js:1277 autoform-slingshot.coffee:143 errorClass {error: " - 403", reason: “Failed to upload file to cloud storage”, details: undefined, message: “Failed to upload file to cloud storage [ - 403]”, errorType: “Meteor.Error”}details: undefinederror: " - 403"errorType: "Meteor.Error"message: "Failed to upload file to cloud storage [ - 403]"reason: "Failed to upload file to cloud storage"stack: (…)get stack: stack()arguments: nullcaller: nulllength: 0name: "get stack"proto: ()set stack: stack()proto: Error(anonymous function) @ autoform-slingshot.coffee:143(anonymous function) @ edgee_slingshot.js:369