Ink/filepicker-rails doesn't preview my unsupported image format

November 13, 2014
development filepicker rails

First, before you go any further… check to make sure the image you’re trying isn’t just broken.

I visited the image in the browser and realized that the browser supported the format, so the broken preview had to be somewhere in filepicker.

In my case I was using a(n) .ico file and since filepicker.io only supports post processing on .jpg and .png I had to come up with a work around.

Once I realized the breakage was in the /convert directive that was automatically filled in for me by the rails gods, the search was on. I dug through the application layer and the gem and I couldn’t get it to relinquish its post processing madness.

So I did what any programmer would do. I hacked the preview to use the plain filepicker url instead of decorating it and it worked greatâ„¢. I used javascript but I’m sure the tangled mess you end up different will require different scissors. I wrote this in case it should one day help a frustrated programmer in need if nothing else, with the simple knowledge that he is not alone in his plight.

GitHub Inbox Zero

August 14, 2020
development devops quarantine open source

the yin and yang of utility

August 8, 2020
development quirky life shower thoughts philosophy

coming soon: peerstate

August 6, 2020
development backstory open source
comments powered by Disqus