Skip to content
This repository has been archived by the owner on Oct 5, 2018. It is now read-only.

Not showing processing image #156

Open
ssoulless opened this issue Nov 23, 2015 · 4 comments
Open

Not showing processing image #156

ssoulless opened this issue Nov 23, 2015 · 4 comments

Comments

@ssoulless
Copy link

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 %>

However it is still not working... any ideas?

@Streek
Copy link

Streek commented Dec 18, 2015

Same issue here.

@Streek
Copy link

Streek commented Dec 19, 2015

Seems this gem is dead.

@ScotterC
Copy link
Collaborator

@Streek not dead. It would appreciate contributions though.

@danielbonnell
Copy link

Any progress on this issue? I just installed the gem and I'm having the same problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants