cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Musicians, convert your MuseScore files to PDF to play music on the go! Learn more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Download Files From Dropbox Using Ruby

Download Files From Dropbox Using Ruby

ROR
Explorer | Level 3

Hi ,

I have xlsx sheet in my dropbox . It have 10 columns and 220 rows .

 My databse table also have 10 columns,  need to feed the xlsx sheet values to table .

 Future i will add addtional rows in the same sheet .

 

I have a button called Sync Data in my applica tion . Whenever i click that button need to verify the sheet(new records) and need to update in DB as well .

4 Replies 4

Greg-DB
Dropbox Staff
The Dropbox API does offer the ability to download files. Dropbox doesn't have an API v2 SDK for Ruby in particular, but you can use the HTTPS endpoints directly. For example, to download a file, you would use /2/files/download:

https://www.dropbox.com/developers/documentation/http/documentation#files-download

Or, you can use a third party library:

https://www.dropbox.com/developers/documentation/communitysdks

ROR
Explorer | Level 3

Hi Greg,

 

I followed the documentation ,i created the app inside the dropbox and got the access token . But the problem is,each time dropbox create new access token keys . Then how can i integrate it with my appication and fetch the files .

 

I have set of folders in my dropbox , in frequent time interval i want read the folder and need to download the files and save into database . How can i do that ? . I am using ruby on rails

Greg-DB
Dropbox Staff
Once you retrieve an access token, you can store and re-use it for future calls. While you can revoke access tokens on demand, they don't expire on their own.

To list the contents of folders, you should use /2/files/list_folder[/continue]:

https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue

To download files, you should use /2/files/download:

https://www.dropbox.com/developers/documentation/http/documentation#files-download

ROR
Explorer | Level 3
Thanks for the reply and solution. I will check and let you know .
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    ROR Explorer | Level 3
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?