I have a div and inside it there is an img tag. I have inserted one image ( eg: "img/flower.png"). On clicking a button, is there any way to append this image to a Form Data, so as to upload them to server in node.js.? Is it possible to upload without using form data?
<div id="sampleDiv">
<img src="img/flower.png" id="flower" alt="Rose Flower" />
</div>
<input type="button" id="button" value="Upload" name="submit" />
var form=new Form Data();
form.append("image",document.getElementbyId("flower").src);