CodeLinkIO / Firebase-Image-Upload-React-Native

Demo to handle image with Firebase storage
129 stars 22 forks source link

Downloading Images from Firebase Storage #3

Closed brendanscarano closed 7 years ago

brendanscarano commented 7 years ago

Hello, I'm not sure if this is the proper place to put this question, but I'm having trouble displaying the images from Firebase Storage. Following the example in this app I'm able to upload the images from my Camera Roll to Firebase storage correctly, and it is working great. It seems that each image is a TextEdit Document, and is a reference to a download url. An example of this reference is, "https://firebasestorage.googleapis.com/v0/b/project-1113607456346848220.appspot.com/o/images%2F1486553676321?alt=media&token=bfaa0086-4ed4-49e6-941b-8e58d295f829". When going to this link I can download the image fine but I cannot display it in my React Native app properly.

Is there a way to convert the TextEdit Document reference to a jpeg/png file so it can be displayed in my app properly?

I've attached screenshots of my images in Firebase Storage after uploading them, and then one of the images in Finder after downloading it from the url above. Thanks!

screen shot 2017-02-08 at 7 10 44 am screen shot 2017-02-08 at 7 10 29 am
kasemyassine commented 7 years ago

simply change the mime to 'image/jpg'

brendanscarano commented 7 years ago

thanks @kasemyassine