[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!


Fernando A.

OK a couple of things you can try.
The first is located here CarrierWave mixed content upload processing · GitHub

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

On Jun 16, 8:42am, Fernando A. [email protected]

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

On Jun 16, 8:42am, Fernando A. [email protected]

Thanks! =D

On Mon, Jun 20, 2011 at 4:33 AM, Pete [email protected] wrote:

On Jun 16, 8:42 am, Fernando A. [email protected]

carrierwave?
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


Fernando A.

[iOSDeveloper] - ObjectiveC
[WebDesigner] - CSS3&HTML5
[WebDeveloper] - RubyOnRails
*--------------------------------------------------------------
*
[portfolio] http://www.fernandoaureliano.com -
[blog]http://www.fernandoaureliano.com/