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.
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
will this work in ionic !!!
input type=“file” file-input=“files” onchange = “angular.element(this). scope().filesChanged(this);”
but can l use an “ng-model” to get the picture into firebase
if you really need to upload your images to firebase get this https://github.com/adonespitogo/angular-base64-upload
thanks for the reply
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.