class CarrierWave::Storage::Dropbox::File
Attributes
file_id[R]
Public Class Methods
new(uploader, config, file_id, client)
click to toggle source
# File lib/carrierwave/storage/dropbox.rb, line 45 def initialize(uploader, config, file_id, client) @uploader, @config, @file_id, @client = uploader, config, file_id, client end
Public Instance Methods
delete()
click to toggle source
# File lib/carrierwave/storage/dropbox.rb, line 61 def delete begin @client.delete @file_id rescue ::Dropbox::ApiError end end
file_data()
click to toggle source
# File lib/carrierwave/storage/dropbox.rb, line 49 def file_data @file_data ||= @client.get_temporary_link(@file_id) end
filename()
click to toggle source
# File lib/carrierwave/storage/dropbox.rb, line 53 def filename file_data[0].name end
url()
click to toggle source
# File lib/carrierwave/storage/dropbox.rb, line 57 def url file_data[1] end