Skip to content

Instantly share code, notes, and snippets.

@chrishomer
Last active December 24, 2015 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrishomer/6747927 to your computer and use it in GitHub Desktop.
Save chrishomer/6747927 to your computer and use it in GitHub Desktop.
# A. Puting a file to dropbox
@db_session.client.put_file("/Some Shared Dropbox Folder the User has access to/my_data_file.csv","#{Rails.root}/tmp/my_data_file.csv")
# B. Getting a file from dropbox (from dropbox site)
contents, metadata = @db_session.client.get_file_and_metadata('/magnum-opus.txt')
open('magnum-opus.txt', 'w') {|f| f.puts contents }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment