[Rails-br] [CarrierWave] Upload zips and docs

Hi,

I’m using the carrierwave to upload images and pdf in my application, and I’d like to upload docs and zips too.

I’m already put this formats as extensions allowed, but when I try upload this kind of files, I get the error failed to be processed.

Someone know how I do for get the upload of these files work with carrierwave?

Thanks!

I am having the same issue. The problem is that it is treating ALL files as images(in my case rmagick) and attempting to process them. So far, I have not been able to determine how to process only image extensions.

I have 2 fields setup, one for images one for binary files. somehow I need to configure so rmagick only applies to images.

Pete

OK a couple of things you can try. The first is located here https://gist.github.com/995663

The above solution seemed fine, but I did not test and instead opted to create a new uploader

rails g uploader Doc rails g uploader Image

Then I configured the ImageUploader to use rmagick

in the Model

  mount_uploader :doc, DocUploader   mount_uploader :image, ImageUploader

This allows me to use the image uploader to process images with rmagick and non image files use the DocUploader

Thanks! =D