Start 2025 on time and up to date. Seamlessly integrate your calendars into Dropbox with these simple steps.

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....
  • Здравко's avatar
    4 years ago

    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.