You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Paperclip uses Paperclip::Attachment#most_appropriate_url when populating @queue_for_delete with filenames to be deleted if a instance with attachment is destroyed.
However this method is overriden by delayed_paperclip.
In case of
A new attachment is assigned to model instance
model is saved (:original style file is stored at the location specified by :path) and a new job to make styles is put into resque queue
The model is attempted to be destroyed when worker has not yet generated styles (attachment_processing=true)
Paperclip will not delete original-style file because #most_appropriate_url will return the missing.png url. (I'd like to focus, the instance is not dirty, has an id, file is stored at its correct location, but attachment_processing=true).
This orphaned original-style file will be on stored filesystem forever (untill it is manually removed).
Probably Paperclip::Attachment#url should be also overriden to pass style_name attribute to most_appropriate_url, which would return correct interpolation string if the instance is not dirty and requested style is :original.
The text was updated successfully, but these errors were encountered:
malandrina
pushed a commit
to hoteltonight/delayed_paperclip
that referenced
this issue
Feb 21, 2014
Paperclip uses Paperclip::Attachment#most_appropriate_url when populating @queue_for_delete with filenames to be deleted if a instance with attachment is destroyed.
However this method is overriden by delayed_paperclip.
In case of
Paperclip will not delete original-style file because #most_appropriate_url will return the missing.png url. (I'd like to focus, the instance is not dirty, has an id, file is stored at its correct location, but attachment_processing=true).
This orphaned original-style file will be on stored filesystem forever (untill it is manually removed).
Probably Paperclip::Attachment#url should be also overriden to pass style_name attribute to most_appropriate_url, which would return correct interpolation string if the instance is not dirty and requested style is :original.
The text was updated successfully, but these errors were encountered: