[storage][js] update ref.toString to now correctly return the full bucket path to the ref location
This commit is contained in:
parent
534a52d16a
commit
56fc189d26
|
@ -44,7 +44,6 @@ export default class Analytics extends ModuleBase {
|
||||||
// maximum number of allowed params check
|
// maximum number of allowed params check
|
||||||
if (params && Object.keys(params).length > 25) throw new Error('Maximum number of parameters exceeded (25).');
|
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
|
// 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
|
// 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_"
|
// types are supported. String parameter values can be up to 36 characters long. The "firebase_"
|
||||||
|
|
|
@ -11,15 +11,15 @@ import Storage from './';
|
||||||
export default class StorageReference extends ReferenceBase {
|
export default class StorageReference extends ReferenceBase {
|
||||||
constructor(storage: Storage, path: string) {
|
constructor(storage: Storage, path: string) {
|
||||||
super(path, storage);
|
super(path, storage);
|
||||||
|
this._storage = storage;
|
||||||
}
|
}
|
||||||
|
|
||||||
get fullPath(): string {
|
get fullPath(): string {
|
||||||
return this.path;
|
return this.path;
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo return full gs://bucket/path
|
|
||||||
toString(): String {
|
toString(): String {
|
||||||
return this.path;
|
return `${this._storage.app.options.storageBucket}/${this.path}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue