diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2020-04-26 23:29:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-26 23:29:08 +0200 |
commit | c3ca3801f2b8a44db09b83da2e64130eb2c41ef1 (patch) | |
tree | e73ca016feb38abe9ce7d259e572964ddb86f8d4 /lib/paperclip | |
parent | 2744f61696df70e722cd6ade9564ad4f0f8f34d6 (diff) |
Add separate cache directory for non-local uploads (#12821)
Diffstat (limited to 'lib/paperclip')
-rw-r--r-- | lib/paperclip/attachment_extensions.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/paperclip/attachment_extensions.rb b/lib/paperclip/attachment_extensions.rb index ce5780557..f3e51dbd3 100644 --- a/lib/paperclip/attachment_extensions.rb +++ b/lib/paperclip/attachment_extensions.rb @@ -14,6 +14,15 @@ module Paperclip end end + def storage_schema_version + instance_read(:storage_schema_version) || 0 + end + + def assign_attributes + super + instance_write(:storage_schema_version, 1) + end + def variant?(other_filename) return true if original_filename == other_filename return false if original_filename.nil? |