Posted By: Anonymous
I know it’d be better to do it serverside, but this project is just for a bit of fun.
Dragging files into the browser should be easy enough if I take advantage of the various methods available. (Gmail style)
Encoding/decoding should hopefully be fine. I’ve seen some as3 zip libraries so I’m sure I should be fine with that.
My issue is downloading the files at the end.
window.location = 'data:jpg/image;base64,/9j/4AAQSkZJR....'
this works fine in firefox but not in chrome.
I can embed the files as images just fine in chrome using
<img src="data:jpg/image;ba.." />, but the files won’t necessarily be images. They could be any format.
Can anyone think of another solution or some kind of workaround?
<a href="data:...." target="_blank">(Untested)
Use downloadify instead of data URLs (would work for IE as well)