Class: CloudFile::Dropbox

Inherits:
Service show all
Defined in:
lib/cloud_file/providers/dropbox.rb

Instance Method Summary collapse

Methods inherited from Service

auth_value, #files, for_user, #open, #read_format, register, register_converter, uri_format

Instance Method Details

#read(loc) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/cloud_file/providers/dropbox.rb', line 14

def read(loc)
  #puts "dropbox read #{loc.inspect}"
  url = client.find(loc[:path]).direct_url
  #puts url
  #puts "about to read #{loc[:path]}"
  client.download(loc[:path])
end

#write(loc, content) ⇒ Object



21
22
23
# File 'lib/cloud_file/providers/dropbox.rb', line 21

def write(loc,content)
  client.upload loc[:path],content
end