I'm using Drag and Drop to upload images, but how can I preview my image before saving?
var obj = $('.drop');
obj.on('drop', function(e){
e.stopPropagation();
e.preventDefault();
$(this).css('border',"2px dotted #bdc3c7");
var files = e.originalEvent.dataTransfer.files;
var file = files[0];
});
I've been looking around and found about FileReader
but I have no idea how to implement