How skip behavior of destroying the previous file if it is updated #712
mariaLauraDev
started this conversation in
General
Replies: 2 comments
-
There isn't a direct configuration method, but you could override the method and make it a no-op: class FontUploader < Shrine
class Attacher
def destroy_previous
# don't delete replaced attachments
end
end
end |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks!! That's works perfectly |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my application I have a class that inherits Shrine from the gem and I don't want it to have the behavior of destroying the previous file if it is updated, because this generates corruption in the path of the previous files that are still requested by my system, because it is stored in cache. Is there any method or configuration that I can declare in my class to avoid the behavior of the following screenshot?
My class that inherits shrine
class FontUploader < Shrine end
Beta Was this translation helpful? Give feedback.
All reactions