Hi, I’m building an app with Ionic 2 and Django Rest Framework. I need to take a photo from gallery or camera and upload this picture to my server.
I have this code that opens the camera and takes a picture.
options = {}
Camera.getPicture(options).then((imageData) => {
// imageData is either a base64 encoded string or a file URI
// If it's base64:
let base64Image = "data:image/jpeg;base64," + imageData;
}, (err) => {
});
But I don’t know where it saves the pictures or how can I send it to the server. I don’t find anything on Internet.
In addition to @jasonwaters answer. I have a working example of the FileTransfer plugin here. The only part that is not working is updating the progress to view. Still working on that part. So it will upload your files no problem.