The upload endpoints, such as /2/files/upload, do now allow you to explicitly set `client_modified` when uploading a new version of a file.
For reference, do you need to be able to do so without uploading a new version?
> For reference, do you need to be able to do so without uploading a new version?
Yes that would be ideal.
Rclone uses `client_modified` to save the modification times of files. If a user just does `touch file` then it would be nice to be able to just set the `client_modified` without upload the whole file again.
At the moment rclone will upload the whole file again just to set the modification time which is a bit wasteful. Perhaps there is a better way?
Related to that... If you actually want to upload a the same file with a different `client_modified`, you have to delete the existing file first.
If you don't delete the existing file first, then the upload succeeds, but somehow it has the old `client_modified`, not the new one you just specified in your upload.
I suspect this is upload process checking the hash and noting that the file content is the same after the upload and deciding not to do anything further with the data.
You can work around this by deleting the file first (which is what rclone does) but this isn't ideal as it makes data loss more likely if the transfer of the new file fails.
I'm not sure whether this is part of the same feature request, or whether it it a seperate bug report!
If you think it should be a bug report I'm happy to write it up in more detail with some HTTP API transactions to show exactly what is going on.
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.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!