diff --git a/storages/backends/dropbox.py b/storages/backends/dropbox.py index dc1958757..e4bbea457 100644 --- a/storages/backends/dropbox.py +++ b/storages/backends/dropbox.py @@ -90,7 +90,13 @@ def _open(self, name, mode='rb'): return remote_file def _save(self, name, content): - self.client.put_file(name, content) + name = name.replace ('\\','/') + try: + file_metadata = self.client.metadata(name) + the_rev = file_metadata['rev'] + except: + the_rev = '' + self.client.put_file(name, content, overwrite=True, parent_rev=the_rev) return name def _read(self, name, num_bytes=None):