cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Processing renames efficiently: rename vs delete/add

Explorer | Level 3

I've noticed that "/list_folder/continue" returns "deleted" and "file" if file has been renamed:

{".tag":"deleted","name":"file.txt","path_lower":"/file.txt","path_display":"/file.txt"}
{".tag":"file","name":"file.txt","id":"id:7gDEvEFgtCsBCABCAAAB7w","client_modified":"2016-05-12T18:10:09Z","server_modified":"2016-12-07T03:23:09Z","rev":"621291cf592","size":196005,"path_lower":"/file_new_name.txt","path_display":"/file_new_name.txt"}

 

To avoid redownloading the file again, I would like to be able to recognize these two changes as one "rename". What is proper approach to do this?

It should be pretty straightforward if "deleted" change would return "id", but it doesn't.

 

1 Reply 1
Highlighted

Re: Processing renames efficiently: rename vs delete/add

Dropboxer
Dropboxer
As you noticed, deleted metadata doesn't include the 'id', but I'll be sure to pass this along as a feature request.

Instead, as long as you're storing the previous metadata, you can check the 'id' for the previous metadata you had at the 'path_lower' for the deleted item, and use that to connect it to the new one.

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?