Images To Firebase


#1

Hi, am building an ionic chat app with Firebase and have no idea as to how to send image from the device file system to firebase. NOT from the camera!!!
Need some help!!!
Just started using ionic.


#2

it’s possible but i don’t think you will want to store images in firebase try s3 , cloudinary or even parse but if you want to use fireabase you can do something like this you can check https://developer.mozilla.org/en-US/docs/Web/API/FileReader/readAsDataURL


#3

will this work in ionic !!!

input type=“file” file-input=“files” onchange = “angular.element(this). scope().filesChanged(this);”


#5

but can l use an “ng-model” to get the picture into firebase


#6

if you really need to upload your images to firebase get this https://github.com/adonespitogo/angular-base64-upload


#7

thanks for the reply


#8

That plugin assumes you have a JavaScript File Object.

I have a solution using this plugin https://github.com/timkalinowski/PhoneGap-Image-Resizer checkot the github project where i have used the plugin with the Camera for get it to base64 and to resize the image.

https://github.com/aaronksaunders/Ionic-CameraTest6Plus