From 56fc189d26d1b4d5abfc2df4bd4d8f947be12f72 Mon Sep 17 00:00:00 2001 From: Salakar Date: Mon, 14 Aug 2017 14:06:37 +0100 Subject: [PATCH] [storage][js] update ref.toString to now correctly return the full bucket path to the ref location --- lib/modules/analytics/index.js | 1 - lib/modules/storage/reference.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/modules/analytics/index.js b/lib/modules/analytics/index.js index 23bf99da..278b2f0e 100644 --- a/lib/modules/analytics/index.js +++ b/lib/modules/analytics/index.js @@ -44,7 +44,6 @@ export default class Analytics extends ModuleBase { // maximum number of allowed params check if (params && Object.keys(params).length > 25) throw new Error('Maximum number of parameters exceeded (25).'); - // TODO validate param names and values // Parameter names can be up to 24 characters long and must start with an alphabetic character // and contain only alphanumeric characters and underscores. Only String, long and double param // types are supported. String parameter values can be up to 36 characters long. The "firebase_" diff --git a/lib/modules/storage/reference.js b/lib/modules/storage/reference.js index 4d2a1f9b..c72b9fb2 100644 --- a/lib/modules/storage/reference.js +++ b/lib/modules/storage/reference.js @@ -11,15 +11,15 @@ import Storage from './'; export default class StorageReference extends ReferenceBase { constructor(storage: Storage, path: string) { super(path, storage); + this._storage = storage; } get fullPath(): string { return this.path; } - // todo return full gs://bucket/path toString(): String { - return this.path; + return `${this._storage.app.options.storageBucket}/${this.path}`; } /**