We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c81c27 commit 672b116Copy full SHA for 672b116
2 files changed
CONTRIBUTORS
@@ -18,3 +18,4 @@ Patrick Costello <pcostell@google.com>
18
Silvano Luciani <silvano@google.com>
19
Stephen Sawchuk <sawchuk@gmail.com>
20
Anand Suresh <anandsuresh@gmail.com>
21
+Stephen Zhang <stephen.zsy@gmail.com>
lib/storage/file.js
@@ -426,6 +426,14 @@ File.prototype.createReadStream = function(options) {
426
b: this.bucket.name,
427
o: encodeURIComponent(this.name)
428
});
429
+ if(this.bucket.name.indexOf('.') >= 0) {
430
+ // certificate error if bucket name contains dot, use JSONv1 API
431
+ remoteFilePath = util.format(
432
+ 'https://www.googleapis.com/storage/v1/b/{b}/o/{o}?alt=media', {
433
+ b: this.bucket.name,
434
+ o: encodeURIComponent(this.name)
435
+ });
436
+ }
437
438
createAuthorizedReq(remoteFilePath);
439
0 commit comments