Skip to content

cant make signed url #877

@stellanhaglund

Description

@stellanhaglund

I get this

/home/server/node_modules/gcloud/node_modules/google-auto-auth/index.js:47
client.authorize(function (err) {
^
TypeError: undefined is not a function
at /home/server/node_modules/gcloud/node_modules/google-auto-auth/index.js:47:12
at addScope (/home/server/node_modules/gcloud/node_modules/google-auto-auth/index.js:113:5)
at callback (/home/server/node_modules/gcloud/node_modules/google-auto-auth/node_modules/goo
gle-auth-library/lib/auth/googleauth.js:41:5)
at /home/server/node_modules/gcloud/node_modules/google-auto-auth/node_modules/google-auth-l
ibrary/lib/auth/googleauth.js:124:9
at process._tickCallback (node.js:355:11)

when running this

app.get('/file/:fileId', function(req, res){

var remoteFile = bucket.file(req.params.fileId);

remoteFile.getSignedUrl({
    action: 'read',
    expires: '2025'
}, function(err, url) {
    if (err) {
        console.log('err');
        return;
    }

    console.log(url)

});

});

Metadata

Metadata

Labels

coretype: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions