uploadImgs | This plugin is using to preview imgs | File Upload library
kandi X-RAY | uploadImgs Summary
kandi X-RAY | uploadImgs Summary
This plugin is using to preview imgs when we upload !.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Judge whether the file size is in memory .
uploadImgs Key Features
uploadImgs Examples and Code Snippets
Community Discussions
Trending Discussions on uploadImgs
QUESTION
Im trying to upload an image to firebase storage in a react-native project, then return the download URL once upload is complete.
this is what I tried: EDITED:
...ANSWER
Answered 2020-Jan-25 at 00:58You will need to actually return a value from uploadImg
. Right now it's returning nothing. Add a return
keyword before imageRef.putFile()
to return the promise that its chained promise returns.
QUESTION
In a react-native project, I'm using both react-native-firebase
and the firebase
sdk.
react-native-firebase
does not allow use of firebase storage to upload image blobs, which is why im using the vanilla Firebase javascript SDK to do this part. For distinction's sake, in my code & this post, im identifying the firebase javascript sdk as 'FIREBASE', and the react-native-firebase
as 'firebase'.
I had to initialize my firebase app (even though react-native-firebase
doesn't require this for its function, firebase
does), App.js constructor & imports:
ANSWER
Answered 2020-Jan-23 at 04:56Yes, you have guessed it right, your FIREBASE
instance is unaware of the auth being done by the firebase
since the firebase
handles the native aspects and FIREBASE is just a JS thing. so both of the instances have their own lives and their own prospects with own attributes to identify the user and provide authorization.
To resolve this, try authorizing the user either by the vanilla JS SDK or use the rn-firebase for the whole task.
I would recommend using react-native-firebase
, it has good support for entire firebase stack.
https://rnfirebase.io/docs/v5.x.x/storage/reference/storage
EDIT:
Vanilla JS firebase SDK should not be used in mobile applications especially when it is native since firebase will treat the client as web client and going forward you will not be able to leverage all possible mobile things from firebase such as dynamic links, push notifications and analytics.
Hope this helps! Cheers!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install uploadImgs
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page