How to get image from gallery or take a picture from camera and send it on rest api?


#1

Hello folks, I am new here on Ionic framework. I want to take a picture using camera or get picture from gallery and send its byte array to the rest api using post method.
I just want to use only html, css, and angularjs in my application . I don’t want to use PHP scripts to post data.


#2

hi @vikask
you can use
http://ngcordova.com/docs/plugins/camera/
after the result return , you can post it to your rest api


#3

Hi @AbdouWeber, Thank you for your response. Actually I have done with capture picture from camera and send it to rest api. Now I am looking for browse image from gallery and post it to rest api using angularjs.


#4

Through the same plugin in configuration object you can capture image through camera or from gallery


#5

Hi @AbdouWeber, I have used cordova image picker plugin. It returns me the path of image. I just want to get image from that path and send it to rest api.


#6

@vikask could you please send me that git link that takes image from the camera and post it to REST API