Skip to content

Instantly share code, notes, and snippets.

@uno-de-piera
Created October 4, 2018 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uno-de-piera/5025775eff5a6046cd4d81f5b476277e to your computer and use it in GitHub Desktop.
Save uno-de-piera/5025775eff5a6046cd4d81f5b476277e to your computer and use it in GitHub Desktop.
storageRef.child(`/products/${fileId}`).getDownloadURL().then(url => {
let product = firebase.firestore().collection('products').doc(id);
return product.update({
url: url,
file_id: fileId
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment