Skip to content

Commit 8e98bdf

Browse files
Merge pull request #638 from phw/storage-fix-generic-url
storage: Use standard URL to use path instead of subdomain for bucket
2 parents b157b41 + c3c16dd commit 8e98bdf

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/storage/file.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ File.prototype.createReadStream = function(options) {
425425
var crc32c = validation === 'crc32c' || validation === 'all';
426426
var md5 = validation === 'md5' || validation === 'all';
427427

428-
var remoteFilePath = util.format('https://{b}.storage.googleapis.com/{o}', {
428+
var remoteFilePath = util.format('https://storage.googleapis.com/{b}/{o}', {
429429
b: this.bucket.name,
430430
o: encodeURIComponent(this.name)
431431
});

test/storage/file.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ describe('File', function() {
395395
}
396396

397397
it('should create an authorized request', function(done) {
398-
var expectedPath = util.format('https://{b}.storage.googleapis.com/{o}', {
398+
var expectedPath = util.format('https://storage.googleapis.com/{b}/{o}', {
399399
b: file.bucket.name,
400400
o: encodeURIComponent(file.name)
401401
});

0 commit comments

Comments
 (0)