@@ -7,16 +7,17 @@ import Storage from './';
7
7
8
8
const FirestackStorage = NativeModules . FirestackStorage ;
9
9
10
- export default class StorageReference extends ReferenceBase {
10
+ export default class StorageRef extends ReferenceBase {
11
11
constructor ( storage : Storage , path : Array < string > ) {
12
12
super ( storage . firestack , path ) ;
13
+
13
14
this . storage = storage ;
14
15
}
15
16
16
17
downloadUrl ( ) : Promise < Object > {
17
18
const path = this . pathToString ( ) ;
18
19
this . log . debug ( 'downloadUrl(' , path , ')' ) ;
19
- return promisify ( 'downloadUrl' , FirestackStorage ) ( this . storage . storageUrl , path )
20
+ return promisify ( 'downloadUrl' , FirestackStorage ) ( path )
20
21
. catch ( ( err ) => {
21
22
this . log . error ( 'Error downloading URL for ' , path , '. Error: ' , err ) ;
22
23
throw err ;
@@ -38,7 +39,7 @@ export default class StorageReference extends ReferenceBase {
38
39
this . storage . _addListener ( 'download_resumed' , listener ) ,
39
40
] ;
40
41
41
- return promisify ( 'downloadFile' , FirestackStorage ) ( this . storage . storageUrl , path , downloadPath )
42
+ return promisify ( 'downloadFile' , FirestackStorage ) ( path , downloadPath )
42
43
. then ( ( res ) => {
43
44
this . log . debug ( 'res --->' , res ) ;
44
45
listeners . forEach ( l => l . remove ( ) ) ;
0 commit comments