mirror of
https://github.com/kemko/paperclip.git
synced 2026-01-01 16:05:40 +03:00
Делаем rewind файлам перед чтением
This commit is contained in:
@@ -276,7 +276,9 @@ module Paperclip
|
||||
end
|
||||
|
||||
def to_file(style = default_style)
|
||||
queued_for_write[style]
|
||||
file = queued_for_write[style]
|
||||
file&.rewind
|
||||
file
|
||||
end
|
||||
|
||||
def to_io(*args)
|
||||
|
||||
@@ -234,6 +234,7 @@ module Paperclip
|
||||
}.merge(self.class.upload_options)
|
||||
files.each do |style, file|
|
||||
path = key(style)
|
||||
file.rewind
|
||||
log "Saving to #{store_id}:#{path}"
|
||||
store.put_object(common_options.merge(key: path, body: file))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user