Class: CarrierWave::Storage::Dropbox
- Inherits:
-
Abstract
- Object
- Abstract
- CarrierWave::Storage::Dropbox
- Defined in:
- lib/carrierwave/storage/dropbox.rb
Defined Under Namespace
Classes: File
Instance Method Summary collapse
-
#retrieve!(file) ⇒ Object
Retrieve a single file.
-
#store!(file) ⇒ Object
Store a single file.
Instance Method Details
#retrieve!(file) ⇒ Object
Retrieve a single file
20 21 22 |
# File 'lib/carrierwave/storage/dropbox.rb', line 20 def retrieve!(file) CarrierWave::Storage::Dropbox::File.new(uploader, config, uploader.store_path(file), dropbox_client) end |
#store!(file) ⇒ Object
Store a single file
12 13 14 15 16 17 |
# File 'lib/carrierwave/storage/dropbox.rb', line 12 def store!(file) location = uploader.store_path location = "/Public/#{location}" if config[:access_type] == "dropbox" dropbox_client.put_file(location, file.to_file) end |