Open Qqwy opened 8 years ago
Hi @Qqwy this looks like it might be a great replacement for the current sandbox and demo uploader as it would allow people to add genuine images in the demo environments.
I'm sure this could be a interesting starting point for many and I'm def going to have a play with it. Thanks for contributing it :+1:
Sounds great, but have not been able to make this work, how do you incorporate this?
@CapRoberts
Try this gist
Today I patched together an image uploader for ContentTools hat uses Data URIs , which was what seems to be the best solution to the image uploading problem, at least for my use case.
This has the following advantages:
And the following drawbacks:
.gif
s are rotated or cropped, they lose their animation. (But this is true for most image uploading scripts anyway).This code has obviously been written in normal JS and not in CoffeeScript, as I have no experience with writing CoffeeScript at all, but feel free to include it in the project if you want.
In any case, I hope that this might be helpful to someone else as well.
Have a wonderful day,
~Qqwy