Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ Patrick Costello <[email protected]>
Silvano Luciani <[email protected]>
Stephen Sawchuk <[email protected]>
Anand Suresh <[email protected]>
Stephen Zhang <[email protected]>
8 changes: 8 additions & 0 deletions lib/storage/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,14 @@ File.prototype.createReadStream = function(options) {
b: this.bucket.name,
o: encodeURIComponent(this.name)
});
if(this.bucket.name.indexOf('.') >= 0) {
// certificate error if bucket name contains dot, use JSONv1 API
remoteFilePath = util.format(
'https://www.googleapis.com/storage/v1/b/{b}/o/{o}?alt=media', {
b: this.bucket.name,
o: encodeURIComponent(this.name)
});
}

createAuthorizedReq(remoteFilePath);

Expand Down