@@ -7,16 +7,17 @@ import Storage from './';
77
88const FirestackStorage = NativeModules . FirestackStorage ;
99
10- export default class StorageReference extends ReferenceBase {
10+ export default class StorageRef extends ReferenceBase {
1111 constructor ( storage : Storage , path : Array < string > ) {
1212 super ( storage . firestack , path ) ;
13+
1314 this . storage = storage ;
1415 }
1516
1617 downloadUrl ( ) : Promise < Object > {
1718 const path = this . pathToString ( ) ;
1819 this . log . debug ( 'downloadUrl(' , path , ')' ) ;
19- return promisify ( 'downloadUrl' , FirestackStorage ) ( this . storage . storageUrl , path )
20+ return promisify ( 'downloadUrl' , FirestackStorage ) ( path )
2021 . catch ( ( err ) => {
2122 this . log . error ( 'Error downloading URL for ' , path , '. Error: ' , err ) ;
2223 throw err ;
@@ -38,7 +39,7 @@ export default class StorageReference extends ReferenceBase {
3839 this . storage . _addListener ( 'download_resumed' , listener ) ,
3940 ] ;
4041
41- return promisify ( 'downloadFile' , FirestackStorage ) ( this . storage . storageUrl , path , downloadPath )
42+ return promisify ( 'downloadFile' , FirestackStorage ) ( path , downloadPath )
4243 . then ( ( res ) => {
4344 this . log . debug ( 'res --->' , res ) ;
4445 listeners . forEach ( l => l . remove ( ) ) ;
0 commit comments