jnicklas/carrierwave — Issue #636: Validation on corrupted files not working
Author: idavemm
Created: 2012-02-27 16:17:03+00:00
State: open

I have applied the validations of this wiki: https://github.com/jnicklas/carrierwave/wiki/How-to%3A-Validate-uploads-with-Active-Record

Now, if I upload a corrupted jpg file (for example, text file with the jpg extension), CarrierWave will throw this error:

```
en.errors.messages.mini_magick_processing_error
```

I'm using the cache to display the submitted image, and it is showing a non-existent file (so, it shows a question mark inside a box in Safari). If a valid image was uploaded before, it will be overwritten with the corrupted file.

It seems a bug to me. I have searched through the issues and I have found #386 to be the exact problem I have found.

I'm using latest CarrierWave version (0.5.8) with MiniMagick 3.4 on Rails 3.2.1 (Mac OS X Lion).