We all knew that we needed some sort of uploader to help with bulk uploading images in our app. The problem is, my engineering experience doesn’t involve any technology I could use to write a component myself. Which would be fine at a large company, because I would take a month or two, decide on what technology was best, do some prototyping and then build a component. When our team consists of 3 people that just isn’t an option.
Instead I did some research for a couple hours. Decided to go with flash instead of java. Found a five year old company that made a flash uploader for $39. Built the feature out using the demo version. Shared it with the team to experiment, we all liked it, and that was it. Now there are most likely better solutions out there, but with around 2 – 3 days of time we were able to get a great feature that we are happy with that will move us ahead in helping make photo sharing easier on our site.
If any of you RoR people are going to try and use this uploader there were a couple things I had to do:
The uploader comes up after an ajax request so it isn’t on the intial page. IE did not care for this and threw a bunch of JS errors. This could have been because of the JS hooks provided by the flash component. However, hosting the uploader in an iframe fixed that problem and allowed me to continue on.
After an image is uploaded to the server there is a JS hook that is called on the client. I used this hook to send out an ajax request asking for the image that was just uploaded. This made it so that as each image is uploaded a thumbnail will appear in view on the client.
FireFox on the mac causes the uploader to disappear if opacity is used. So, when the uploader is brought to view I dynamically disable opacity and restore it when uploading is finished.
If anyone has more experience with this I’d certainly like to hear about it. Picture is below, and use the site and try it out for yourself ![]()
