Carrierwave large file optimization

29 views
Skip to first unread message

Walter Lee Davis

unread,
Jun 21, 2013, 12:54:48 PM6/21/13
to rubyonra...@googlegroups.com
Carrierwave documentation includes this tip for uploading large files. Inside your uploader, add these two methods (they say)

def move_to_cache
true
end
def move_to_store
true
end

to make the uploads work more efficiently. This is true, it does work -- as long as you aren't trying to do anything with versions or other processing. If you do, then the upload will only ever work in a create method, not an update.

Can anyone suggest a way where I may be able to take advantage of the one-pass upload on create, but still manage to access the stored file as a file (the result of move_to_cache, I believe) when I need to?

Thanks in advance,

Walter
Reply all
Reply to author
Forward
0 new messages