cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: 

Re: Retrieve with a File limit and File count

Retrieve with a File limit and File count

axew3
Collaborator | Level 8
Go to solution

Last post i've do on answer on another topic asking about app folder or full dropbox, and how to detect, was completely not necessary, once i've see how API answer in these cases and how all work about.

 

Now, i've see there is around a post about files count and folder quota (if i'm not wrong on remember) but from the little on this, i can't understand, or better, i can't find out a way to achieve what i would, in full.

 

Even if the coded plugin provide a cache system,

i had a nice ( ?? 🙂 ) idea, to put on the user admin interface, an option that let choose how many files retrieve. The option let choose between a minimum of 200 or multiple of 200, as this is the dbx default number for each call.

 

All work nice, but as a thing is never perfect, i would like to add also the last beautiful thing to the user, on his dbx page: something like, You have 274 files linked in sharing, of 600 in total allowed.

I can get the value of this, counting the cached array, and comparing with the limit.

 

While, i can't previously know, how many linked files the user have, if i set limit to 200 files, only one call, but the user have linked in sharing more than 200.

There is no way to know the 'count' of shared files. Isn't it?

 

But i know there is an has_more cursor, so at best i can inform that 200 have been retrieved, but there are more, that have not been retrieved.

 

... finishing to write this, is all more clear also to me maybe now.

 

I'm wrong in something?

 

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

It sounds like you're referring to /2/sharing/list_shared_links, is that right? The API doesn't currently offer a way to get the total count like this, but I'll be sure to pass this along as a feature request. 

View solution in original post

6 Replies 6

axew3
Collaborator | Level 8
Go to solution
the FILES LIMIT option i've add/think to, present also the follow problem:
API answers return files, starting from latest added/uploaded files into dbx by the user.

Greg-DB
Dropbox Staff
Go to solution

It sounds like you're referring to /2/sharing/list_shared_links, is that right? The API doesn't currently offer a way to get the total count like this, but I'll be sure to pass this along as a feature request. 

axew3
Collaborator | Level 8
Go to solution

you're right! this the result, after also your's helps, if i can:

https://plugins.w3tasks.com/wp/index.php/dropbox/?u=admin

it is possible to register and test. This linked as example is just a test account for an user named admin

now i know there are more ways to achieve a result and maybe i can now rewrite in another way, using DBX API in different way ... but it work very fast due to a little cache system added, that seem to work really nice!

The plugin is done by just 5 little files, and 1 unique class, but let for each user do anything into his DBX, within WP.

Admin can choose which groups can use the dbx feature, files limit, cache time, full dbx or app folder.

Not totally sure the way to release it .... i could ticket something about maybe for some help hint?

Thank you for all.

axew3
Collaborator | Level 8
Go to solution

p.s it use all the dbx more easy available features, coded at once, and it is funny how using it you can do really all, with this little code. P.s it is still little raw, but work like a charm-

 

p.s i know there is no need for you but ... maybe for others, the user menu about DBX appear on user profile page, after registered!

 

p.s about file count on first API answer in list_shared_links: would be great, for a files limit feature that can so be added more easily, but in true, is possible to inform about the fact that there are more files, but only some have been retrieved, and display maybe, in this case, only files and not folders extracted from array response. By the way the count available would be maybe useful for some other nice thing to display to users.

Greg-DB
Dropbox Staff
Go to solution
Thanks for the feedback!

As far as releasing your app, on the Dropbox side of things, please refer to the documentation for production approval:

https://www.dropbox.com/developers/reference/devguide#production-approval

axew3
Collaborator | Level 8
Go to solution

i'm doing something else and i do not know if it can be easy or not to implement on chooser ... but should be a good feature, if i could pass on loading it, a param to open on specified folder  ... yeah, ok this would be very nice, since we can already redirect where we want after an upload (for example) the chooser code.

Need more support?