Skip to content

Conversation

@mxlius
Copy link

@mxlius mxlius commented Aug 28, 2019

Fix error message: "Cannot read property '0' of undefined"
Root cause: Storage API FullMetadata.downloadURLs is deprecated, ref:https://firebase.google.com/docs/reference/js/firebase.storage.FullMetadata.html#downloadurls

Replace with Reference.getDownloadURL, https://firebase.google.com/docs/reference/js/firebase.storage.Reference.html#getdownloadurl

Fix error message: "Cannot read property '0' of undefined"
Root cause: Storage API ```FullMetadata.downloadURLs``` is deprecated, ref:https://firebase.google.com/docs/reference/js/firebase.storage.FullMetadata.html#downloadurls

Replace with ```Reference.getDownloadURL```, https://firebase.google.com/docs/reference/js/firebase.storage.Reference.html#getdownloadurl
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@mxlius
Copy link
Author

mxlius commented Aug 28, 2019

@googlebot I signed it!

@ramblescout
Copy link

ramblescout commented Mar 21, 2021

Adding a note that I couldn't get this to work (node 12). I kept getting an error that downloads[0] wasn't an object. I switched back to the "deprecated" version and now it works. Might have trouble later, if so I'll come back and update.

Upload failed: - TypeError: undefined is not an object (evaluating 'snapshot.metadata.downloadURLs[0]')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants