< img class="main" src="assets/images/Group 18.jpg" id="use_current">
I am trying to create FormData to send in xhr request but I am facing issue when appending Image data from img tag.
I tried someting like
const aForm = new FormData();
aForm .append("pipe", "pipeName");
aForm .append("pipetype", "pipetypeName");
const blob = new Blob(["localhostimagepath"], { type: "multipart/form-data" });
aForm .append("webmasterfile", blob);
xhr.send(aForm );
But getting error regardinf image data , like invalid image FIle .This needs to be sent as BINARY.