Hello,
I'm trying to build a blogging platform powered by markdown files in dropbox.
So, I need to keep the file and the blog in sync.
To do this, I am using filesListFolderContinue (JS SDK) and pass the cursor from the previous sync to get the diff.
One issue I see is that on a slow/flaky connection or when large files are renamed or moved, dropbox API responds with a delete only as opposed to a delete and a new file.
Example below:
[1] When I rename the file original-file.txt to new-file.txt, the response from filesListFolderContinue is:
{
entries: [
{
'.tag': 'deleted',
name: 'original-file.txt',
path_lower: '/test/original-file.txt',
path_display: '/test/original-file.txt'
}
],
cursor: '...',
has_more: false
}
[2] Just a few seconds later, the response includes the new file is includes, using the same cursor:
{
entries: [
{
'.tag': 'deleted',
name: 'original-file.txt',
path_lower: '/test/original-file.txt',
path_display: '/test/original-file.txt'
},
{
'.tag': 'file',
name: 'new-file.txt',
path_lower: '/test/new-file.txt',
path_display: '/test/new-file.txt',
...
}
],
cursor: '...',
has_more: false
}
I expected to only see the second response, without ever being able to see the first, as there is no way to differentiate an actual Delete vs a Move or a Rename.
I would appreciate any recommendations to handle this scenario and differentiate a DELETE VS MOVE/RENAME.
Thank you