Yeah, I tried. But the error was not header. I’m converting the picture in base64. I get 500 error on server. But this API is being used. An already successful working api
If the picture is sent blank, it works and saves the picture blank.
function getBase64(file,callback,text) {
if(!file){
callback(false);
return false;
}
var image = [];
image.name =file.name;
image.type = "image/"+file.name.substring(file.name.lastIndexOf('.')+1, file.name.length);
image.text = text ? text : null;
var reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = function () {
image.content = reader.result;
callback(image);
};
reader.onerror = function (error) {
callback(false);
};
}