I want to be able to preview an image for a user before they upload it.
I've of course discovered that all the modern browsers obscure the actual full path in one way or another, so my original plan of just setting an <img />
element with the local path is out of the question.
I've found this solution, which isn't bad, but I'm expecting the images to be a little bit large, and my users' internet connections to perhaps be a little slow, so this isn't exactly ideal.
I've found that FireFox has the getAsDataURL()
method, which would work perfectly if there was some form of it in the other browsers, or at least even IE, but I haven't been able to find it.
Is there any other way to do this and have it work in IE7/8 (6 is a bonus but I don't care that much), FF2/3, and webkit without resorting to a plugin?