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: 

If-Modified-Since and Last-Modifed headers

If-Modified-Since and Last-Modifed headers

gonzalogg
New member | Level 2
Go to solution

Hi, i need to know if Dropbox supports If-Modified-Since and Last-Modifed http headers.

 

The thing is that i need to know when a file is updated, and i think this fuctionality is not sopported by Dropbox.

 

Can you help me? Maybe i could do it through de API?

 

Thanks in advance.

 

 

 

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

The Dropbox API doesn't support If-Modified-Since/Last-Modifed header functionality.

 

Instead, to check if a file has changed, you can store/check the 'rev' value in the file's metadata. For example, you can call /2/files/get_metadata and store the returned 'rev' value. When you call back later, if the 'rev' value has changed, you know the file changed. This also works with any call where you get file metadata back, e.g., /2/files/list_folder[/continue], etc. Likewise, you can use the 'content_hash' value to check if the file data itself is different.

 

The file metadata also contains 'client_modified' and 'server_modified' information indicating when the file changed.

View solution in original post

1 Reply 1

Greg-DB
Dropbox Staff
Go to solution

The Dropbox API doesn't support If-Modified-Since/Last-Modifed header functionality.

 

Instead, to check if a file has changed, you can store/check the 'rev' value in the file's metadata. For example, you can call /2/files/get_metadata and store the returned 'rev' value. When you call back later, if the 'rev' value has changed, you know the file changed. This also works with any call where you get file metadata back, e.g., /2/files/list_folder[/continue], etc. Likewise, you can use the 'content_hash' value to check if the file data itself is different.

 

The file metadata also contains 'client_modified' and 'server_modified' information indicating when the file changed.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?