CulturalMe/meteor-slingshot

Google Cloud Storage error: SignatureDoesNotMatch

Opened this issue · 3 comments

Error uploading:
The request signature we calculated does not match the signature you provided. Check your Google secret key and signing method.

I double checked my GoogleAccessId and GoogleSecretKey I even made new one, but none work what should I do to get google Cloud Storage to work with slingshot ?

Slingshot.GoogleCloud.directiveDefault.GoogleSecretKey = Assets.getText('my-images.pem');
Slingshot.fileRestrictions("myFileUploads", {
    allowedFileTypes: ["image/png", "image/jpeg", "image/gif"],
    maxSize: 10 * 1024 * 1024 
});
Slingshot.createDirective("myFileUploads", Slingshot.GoogleCloud, {
    bucket: Meteor.settings.GoogleCloudBucket,
    acl: "public-read",
    authorize: function () {
        return true;
    },
    key: function (file) {
        return file.name + "/" + file.name;
    }
});

and on the client :

let uploader = new Slingshot.Upload("myFileUploads");
        uploader.send(document.getElementById('file').files[0], function (error, downloadUrl) {
            if (error) {
                console.error('Error uploading', uploader.xhr.response);
                alert (error);
            }
            else {
                console.log("here is the url to see the file:",downloadUrl);
            }
        });

Hey @Hamatek !
I'm facing same error (code 403). Did you solved this issue? Would like to hear from you.

Sorry i gave up and used aws s3

Le sam. 12 mars 2016 12:43 PM, Pratik Khandagale notifications@github.com
a écrit :

Hey @Hamatek https://github.com/Hamatek !
I'm facing same error (code 403). Did you solved this issue? Would like to
hear from you.


Reply to this email directly or view it on GitHub
#152 (comment)
.

Thanks for your reply! I will go with S3 without wasting further time.