Hello I’m trying to send a file over to my api using FormData() in ionic 2. But it isnt working for me and I’m not sure what the correct way would be for this.
I currently create a:
let body = new FormData()
and then I try to append the file
What I think is going wrong is that I dont have the correct
file format and I’m only pointing towards the file locations. Anyone know how I could directly put the imagedata/file in there?
In Postman sending a ‘file’ with formdata works but I just cant seem to figure it out here.
I saw that there was a File plugin but I’m not sure how to use this to get what I want.
is it as simple as using a different
Camera.DestinationType or do I have to do something else?