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

November 13, 2014
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.

Imaginary Lines

April 1, 2016
react graphql relay rails emberjs rest engineering

Voltrb first impressions

December 4, 2014
voltrb rails meteorjs
comments powered by Disqus