Image upload to API service using http POST

Hi,

I develop some app similar to Instagram and I need to send image using http POST to API service. I tried to use FormData object but in this topic File Upload using HTTP Post (multi form data) I found answer that this don’t work on ionic. So I tried to use ng-cordova file upload…

$cordovaFile
.uploadFile(server, filePath, options)
.then(function(result) {
  // Success! 
}, function(err) {
  // Error
}, function (progress) {
  // constant progress updates
});

…but in this method I can’t send image by request parameter like in my API service (Data parameters to POST in my API data: { file: [binary file here], title: [file title] } ).

Do you know any the other ways to solve this issue? How can I POST my image in parameter ‘file’?

Thanks in advance!

There is no way around --> i create own upload endpoints that only recieve the files.