Im using Rails 4.2.5 with ruby 2.1.4, delayed_job 4.1.1 and delayed_paperclip 2.9.1
Well this is my configuration, I have a model called Picture:
class Picture < ActiveRecord::Base
belongs_to :ofert, dependent: :destroy
has_attached_file :image, :styles => { :medium => "300x300#", :thumb => "100x100>", :large => "600x400#", :morethumb => "50x50#", :ultrathumb => "25x25#" },
:default_url => "https://s3-sa-east-1.amazonaws.com/:s3_bucket/ofert_defaults/:style/brown_hat.jpg"
validates_attachment_content_type :image, :content_type => /\Aimage\/.*\Z/
validates_attachment_presence :image, :if => :isProduction?
validates_attachment_size :image, :less_than => 5.megabytes
process_in_background :image, processing_image_url: 'https://s3-sa-east-1.amazonaws.com/:s3_bucket/ofert_defaults/:style/brown_hat.jpg'
#Checks if the current env is production, so we skip this validation on development
def isProduction?
Rails.env == 'production'
end
end
when I create them the bakcground processing is occurring normally, however when I try to display the picture the image is broken, I mean it has the link of the image in amazon s3 but it is broken, I wait some seconds and reload the page and the images are shown as expected.
as you can see above I set the processing_image_url but it seems to not be working, I even tried to do the following:
<% if picture.image.processing? %>
<strong>The image is being processed</strong>
<% else %>
<%= link_to picture.image.url(:medium), data: { large: picture.image.url } do %>
<%= image_tag picture.image.url(:thumb) %>
<% end %>
<% end %>
Im using Rails 4.2.5 with ruby 2.1.4, delayed_job 4.1.1 and delayed_paperclip 2.9.1
Well this is my configuration, I have a model called Picture:
when I create them the bakcground processing is occurring normally, however when I try to display the picture the image is broken, I mean it has the link of the image in amazon s3 but it is broken, I wait some seconds and reload the page and the images are shown as expected.
as you can see above I set the
processing_image_url
but it seems to not be working, I even tried to do the following:However it is still not working... any ideas?