cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Tell us what you want to see on the Community here!
Close

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: 

Getting shared link for each file takes a lot of time

Highlighted

Getting shared link for each file takes a lot of time

Explorer | Level 3

Hello everyone!

Im building something associated with dropbox for my thesis. As I am fetching the files with the 'files/list_folder' endpoint, I wanted for each file, to check if it has a "shared link" . For example, in my drive I have 42 files in root folder. Fetching all those files plus for each file fetching if it has a shared link using the 'sharing/list_shared_links' , takes a huge amount of time. It takes ~0.6 seconds for each request so for 42 files that is ~25 seconds! Thats kinda slow but I can recognise that its usual since i make multiple requests.

 

So my question is, if there is something "fancier" and more time consuming that I can do since thats a big problem for me currently.

Thank you.

1 Accepted Solution

Accepted Solutions
Highlighted

Re: Getting shared link for each file takes a lot of time

Dropboxer

If you call /2/sharing/list_shared_links without specifying the "path" parameter, it should return a list of all of the shared links for the connected account. You could then check the list of files against that entire list of shared links. That would likely be faster than calling /2/sharing/list_shared_links for each one. (Note that the /2/sharing/list_shared_links interface is paginated though, so be sure to check the returned 'has_more' value and call back again if needed. Check out the 'has_more' field documentation for more information.)

View solution in original post

3 Replies 3
Highlighted

Re: Getting shared link for each file takes a lot of time

Explorer | Level 3

I forgot to mention, that I don't mind if I dont get the shared link. I just want to check if the file is "shared" in the first place. But in the files metadata this info doesn't exist from what I found...

Highlighted

Re: Getting shared link for each file takes a lot of time

Dropboxer

If you call /2/sharing/list_shared_links without specifying the "path" parameter, it should return a list of all of the shared links for the connected account. You could then check the list of files against that entire list of shared links. That would likely be faster than calling /2/sharing/list_shared_links for each one. (Note that the /2/sharing/list_shared_links interface is paginated though, so be sure to check the returned 'has_more' value and call back again if needed. Check out the 'has_more' field documentation for more information.)

View solution in original post

Highlighted

Re: Getting shared link for each file takes a lot of time

Explorer | Level 3

Thank you very much. Works like a charm!

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?