0

Hi I am developing an ionic app using firebase as my database.

I read this question. I understand it and have a more specific question.

I uploaded an image on amazon s3, imgur and filestack, and tried all three in firebase using data:url/<the url of image> and data:image/jpeg;<url of image>.

Am I typing something wrong into firebase?

The image does not come up. I do not want to write code in the app to upload the image etc, I just simply want an image to display on the app beside some data corresponding to an item in my firebase database.

I have read about base64, do I have to use it in this case?

(Optional) Perhaps If you could expand on the steps of doing this:

"You can use a filepicker to get the image file. Then you can host the image however you want, i prefer amazon s3. Once the image is hosted you can display the image using the url generated for the image."

Michael
  • 67
  • 1
  • 1
  • 8
  • Don't post links to images here. For Firebase data, show us the actual JSON, which you can get by clicking the Export button in your dashboard. And we'll also need to see what your code does with the URL, otherwise we're just guessing at what might go wrong and that's not a very efficient way of helping you troubleshoot. – Frank van Puffelen Mar 30 '16 at 21:25
  • Thank you for letting me know this Frank. I will keep that in mind next time. – Michael Mar 31 '16 at 09:55

1 Answers1

1

I don't have much ionic experience, but why not just save the direct path to the image url and not include the data:url/ portion.

Simply store the url in firebase and then when it's retrieved inject it into your img src.

Kyle
  • 1,463
  • 1
  • 12
  • 18
  • Thank you Kyle. adding it as a direct url solved my issue. I really was looking into this too deeply. I appreciate your guideance. – Michael Mar 30 '16 at 21:06