Drag and drop image convert to Base64
问题 I require the following functionality in my website. Everything has to be done on the client (javascript or any javascript library). I have an image in my local machine, drag and drop it in the browser. Without any request to the server, the javascript has to convert this image as base64. I have a code for converting the image to base64 on the client side, but this one requires HTTP URL. What I need is, the image needs to be uploaded from local. function toDataURL(url, callback) { var xhr =