用AJAX加载图像文件吗?

I was wondering if it's possible to load an image (from a form with an < input type="file" /> or something else like drag-and-drop area) only with AJAX ?

I ask this question because everyone have answered : "No it's definitely impossible due to a security problem. A web browser can't access file system".

So how this website do : Mothereffing Animated Gif ?

Thanks ! :)

I googled "ajax drag and drop file", and the first result is this.

Short answer: yes, it's very much possible. You should consider, though, that drag and dropping doesn't work perfectly on every browser/enviroment, so you should still keep an alternate button just in case.

Mothereffing Animated Gif is using Backbone and this script to convert the image to base64 data url.