uploader = AvatarUploader.new
my_file = open('my_file.txt')
uploader.store!(my_file) #carrierwaveのstore_dirに保存される
my_file2 = open('my_file2.txt')
uploader.store!(my_file2) #carrierwaveのstore_dirに保存される
uploader.retrieve_from_store!('my_file.txt') #保存されたファイルを表に持ってくる
puts uploader.file.read #表に持ってきたファイル(my_file.txt)を読み出し
uploader.retrieve_from_store!('my_file2.txt') #保存されたファイルを表に持ってくる
puts uploader.file.read #表に持ってきたファイル(my_file2.txt)を読み出し
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
33