title: How to create thumbnails with carrierwave after uploading the original file directly to s3 with jquery file upload
body: <p>I am uploading image via jquery_file_upload (Railscast episode #383)
  The upload work perfectly and i get the url in the callback function</p>
  
  <p>The problem is: I want to create some thumbnails after uploading directly to s3</p>
  
  <p>for that i assume:</p>
  
  <ol>
  <li>The server has to read the image from the s3</li>
  <li>The server has to create the thumbnails</li>
  <li>The server has to store the thumbnails directly in s3 </li>
  <li>The server has to get callback and display the thumbnails accordingly.</li>
  <li>The server has to store a field the the thumbnails created</li>
  </ol>
  
  <p>Now, after the image finish to upload the image controller callback called:</p>
  
  <pre><code>def create
   #get the url from the callbcack
   #e.g: image[image_source] = https://&lt;BUCKET&gt;.s3.amazonaws.com/uploads/myimage.png
   @image = Image.new(params[:image])
   @image.user_id = current_user.id
   @image.save
  end
  </code></pre>
  
  <p>And the model:</p>
  
  <pre><code>class Image &lt; ActiveRecord::Base
    attr_accessible :image_thumb, :user_id, :width ,:album_type_id 
    after_save :enqueue_image
  
    mount_uploader :image_thumb, ImageUploader
  
    def enqueue_image
     #checking if i have the original image
     if self.image_source present?
      #what to do here?
      #how can i call the carrierwave function to create the thumbnails?
      #how to send the thumbnails directly to s3 with callback name?
     end
  
    end
  end
  </code></pre>