title: Paperclip not replacing the cropped image. at s3
body: <p>I am using paperclip for uploading the images. My storage space is at S3. I am using Jcrop with paperclip for crop the images and have followed the #RailsCast182.</p>
  
  <p>Everything is working smoothly, there were some issues in the RailsCast which i have resolved. </p>
  
  <p>I want to process the crop file and upload it at s3. </p>
  
  <p>Here is my log showing that image is cropped</p>
  
  <hr>
  
  <pre><code>Command :: file -b --mime-type '/tmp/249ac5b855195d2e761e123315dd229b20140701-3395-1mz9lji'
  
  Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/4e6c43285b27dbc35603a428c4e4ca9920140701-3395-moimyl[0]' 2&gt;/dev/null
  
  Command :: identify -format %m '/tmp/4e6c43285b27dbc35603a428c4e4ca9920140701-3395-moimyl[0]'
  
  Command :: convert '/tmp/4e6c43285b27dbc35603a428c4e4ca9920140701-3395-moimyl[0]' -crop 2586x2586+2534+0 -auto-orient -resize "100x100&gt;" '/tmp/4e6c43285b27dbc35603a428c4e4ca9920140701-3395-moimyl20140701-3395-stdr75'
  
  convert.im6: geometry does not contain image `/tmp/4e6c43285b27dbc35603a428c4e4ca9920140701-3395-moimyl' @ warning/transform.c/CropImage/574.
  
  Command :: file -b --mime '/tmp/4e6c43285b27dbc35603a428c4e4ca9920140701-3395-moimyl20140701-3395-stdr75'
  
  Command :: identify -format '%wx%h,%[exif:orientation]' '/tmp/4e6c43285b27dbc35603a428c4e4ca9920140701-3395-moimyl[0]' 2&gt;/dev/null
  
  Command :: identify -format %m '/tmp/4e6c43285b27dbc35603a428c4e4ca9920140701-3395-moimyl[0]'
  
  Command :: convert '/tmp/4e6c43285b27dbc35603a428c4e4ca9920140701-3395-moimyl[0]' -crop 2586x2586+2534+0 -auto-orient -resize "50x50&gt;" '/tmp/4e6c43285b27dbc35603a428c4e4ca9920140701-3395-moimyl20140701-3395-bhth1i'
  
  convert.im6: geometry does not contain image `/tmp/4e6c43285b27dbc35603a428c4e4ca9920140701-3395-moimyl' @ warning/transform.c/CropImage/574.
  
  Command :: file -b --mime '/tmp/4e6c43285b27dbc35603a428c4e4ca9920140701-3395-moimyl20140701-3395-bhth1i'
  
  After that it shows that image is uploaded at s3 but it was the same org image that uploaded.
  </code></pre>
  
  <hr>
  
  <p>My attachment model:</p>
  
  <pre><code>class Attachment &lt; ActiveRecord::Base 
      has_attached_file :file, styles: { medium: "100x100&gt;", thumb: "50x50#" }, :processors =&gt; [:cropper]
  
      attr_accessor :crop_x, :crop_y, :crop_w, :crop_h
  
    def cropping?
      !crop_x.blank? &amp;&amp; !crop_y.blank? &amp;&amp; !crop_w.blank? &amp;&amp; !crop_h.blank?
    end
  end
  
  #paperclip custom cropper
  
  module Paperclip
    class Cropper &lt; Thumbnail
      def transformation_command
        if crop_command
          crop_command + super.join(' ').sub(/ -crop \S+/, '').split(' ')
        else
          super
        end
      end
  
      def crop_command
        target = @attachment.instance
        if target.cropping?
          ["-crop", "#{target.crop_w}x#{target.crop_h}+#{target.crop_x}+#{target.crop_y}"]
        end
      end
    end
  end
  </code></pre>
  
  <p>But paperclip never change the image at S3.</p>
  
  <p>I have gone through many link but didn't touch the sky.</p>
  
  <p>Looking forward a help from great community.</p>
  
  <p>Regards
  Adam</p>