I am uploading an image using chrome extension. My process flow as
Read image ->
file reader(readAsText)
Extension ->
formData.append('uploadFile', new Blob([file], {
type : data.fileType
}));
$.ajax({
type : "POST",
url : URI,
data : formData,
contentType : false,
processData : false,
cache : false,
async : true,
success : function (result) {
}
});`
When I retrieve image using tag I am getting an corrupted image. When I check with server for files using direct fileupload using form submit and extension have same data but encoding type was different.
Direct upload file saved as ANSI format and extension saved as UTF-8.