downloadURL previously deprecated was removed
In Firebase version 5 the downloadURL property was removed. Please see: https://firebase.google.com/support/release-notes/js You should now use ref.getDownloadURL() (please note that this method returns a promise). As this project use version 5 package.json = `"firebase": "^5.0.4"`
This commit is contained in:
committed by
GitHub
parent
e675ea512b
commit
b7394ad191
@@ -20,7 +20,13 @@ export class StorageService implements IStorageService {
|
|||||||
// Upload file
|
// Upload file
|
||||||
let task = storegeFile.put(file)
|
let task = storegeFile.put(file)
|
||||||
task.then((result) => {
|
task.then((result) => {
|
||||||
resolve(new FileResult(result.downloadURL!,result.metadata.fullPath))
|
result.ref.getDownloadURL()
|
||||||
|
.then((downloadURL) => {
|
||||||
|
resolve(new FileResult(downloadURL, result.metadata.fullPath))
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
reject(error)
|
reject(error)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user