You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

pcooperuk's avatar
pcooperuk
Explorer | Level 3
4 years ago

Dropbox, webhooks, continue, 20,000+ folders

So I have setup dropbox, have everything working well, have also setup webhooks to notify that a unknown change has happened.

Here is my problem, the dropbox instance has 22,000+ folders inside it.

 

There is absolutely no way I can efficiently process this volume of /folder/continues just for example if one file / folder has changed.  It makes Zero sense.

 

What is the solution, or is it impossible to truly detect a single file / folder change and efficiently process that change?

 

There is no way to identify the change, all I can do is call listfolder/continue on every single folder which makes the dropbox API pretty much useless in instances where there are a very large number of folders.


  • pcooperuk wrote:

    ..., have also setup webhooks to notify that a unknown change has happened.

    ... no way I can efficiently process this volume of /folder/continues just for example if one file / folder has changed.  ...

    ...

    There is no way to identify the change, all I can do is call listfolder/continue on every single folder ...


    Hi pcooperuk,

    Seems you haven't read very careful the Dropbox API documentation! 🙂 Are you aware what list cursor is?! 🧐 The same cursor your are using with "listfolder/continue" calls. Seems you are not aware, so I will make a brief review. The cursor iterates over the records in sequence described by the last action happened on every listed entry (latest changed entries are last in the list). Yes, if you are running listing anew every time, all entries will get enumerated in the order just described (of course). That's truly meaningless! That's why you have to keep your last iterator and on next event use the stored iterator to continue from, not anew. 😉 In such a way only changed entries gonna be listed. Even more, to avoid enumerate every one folder in your account explicitly, you can initiate recursive listing on the account root and use the returned cursor in your webhook handler. 😜

    Hope this clarifies matter.

  • Здравко's avatar
    Здравко
    Legendary | Level 20

    pcooperuk wrote:

    ..., have also setup webhooks to notify that a unknown change has happened.

    ... no way I can efficiently process this volume of /folder/continues just for example if one file / folder has changed.  ...

    ...

    There is no way to identify the change, all I can do is call listfolder/continue on every single folder ...


    Hi pcooperuk,

    Seems you haven't read very careful the Dropbox API documentation! 🙂 Are you aware what list cursor is?! 🧐 The same cursor your are using with "listfolder/continue" calls. Seems you are not aware, so I will make a brief review. The cursor iterates over the records in sequence described by the last action happened on every listed entry (latest changed entries are last in the list). Yes, if you are running listing anew every time, all entries will get enumerated in the order just described (of course). That's truly meaningless! That's why you have to keep your last iterator and on next event use the stored iterator to continue from, not anew. 😉 In such a way only changed entries gonna be listed. Even more, to avoid enumerate every one folder in your account explicitly, you can initiate recursive listing on the account root and use the returned cursor in your webhook handler. 😜

    Hope this clarifies matter.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,915 PostsLatest Activity: 5 hours ago
333 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!