Skip to content

Commit

Permalink
Merge pull request #638 from phw/storage-fix-generic-url
Browse files Browse the repository at this point in the history
storage: Use standard URL to use path instead of subdomain for bucket
  • Loading branch information
stephenplusplus committed Jun 4, 2015
2 parents b157b41 + c3c16dd commit 8e98bdf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/storage/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ File.prototype.createReadStream = function(options) {
var crc32c = validation === 'crc32c' || validation === 'all';
var md5 = validation === 'md5' || validation === 'all';

var remoteFilePath = util.format('https://{b}.storage.googleapis.com/{o}', {
var remoteFilePath = util.format('https://storage.googleapis.com/{b}/{o}', {
b: this.bucket.name,
o: encodeURIComponent(this.name)
});
Expand Down
2 changes: 1 addition & 1 deletion test/storage/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ describe('File', function() {
}

it('should create an authorized request', function(done) {
var expectedPath = util.format('https://{b}.storage.googleapis.com/{o}', {
var expectedPath = util.format('https://storage.googleapis.com/{b}/{o}', {
b: file.bucket.name,
o: encodeURIComponent(file.name)
});
Expand Down

0 comments on commit 8e98bdf

Please sign in to comment.