-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
How to use GitHub
- Please use the 👍 reaction to show that you are interested into the same feature.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Is your feature request related to a problem? Please describe.
While working on nextcloud/files-clients#42 and nextcloud/android#19, I came up with an experimental concept to improve synchronisation with mobile clients and introduce robust bidirectional synchronisation for the Android client.
For this concept to work, the server needs to provide a history of the files in question. This can be provided via the files_versions app. Another requirement is the introduction of server-side checksums. This allows clients to locally check the current file against a backlog of versions to improve the handling of file conflicts and minimise manual intervention.
Describe the solution you'd like
To be concrete: I would like the versioning record for each file version to be extended to include a checksum of the actual file content. The checksum can either be calculated when a file version is created (persisted to memory), or on demand, when a client queries the corresponding property.
Ideally the current response would be extended to the following:
<d:propstat>
<d:prop>
<d:getcontentlength>3524</d:getcontentlength>
<d:getcontenttype>text/plain</d:getcontenttype>
<d:getlastmodified>Thu, 6 Feb 2025 21:36:17 GMT</d:getlastmodified>
<d:getetag>1738877777</d:getetag>
<nc:version-author>user</nc:version-author>
<nc:has-preview>true</nc:has-preview>
<oc:checksum>md5:16d15276ca33bd0212c871fae86947f2</oc:checksum>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>Including <oc:checksum> for any individual version.
Describe alternatives you've considered
Several alternative approaches have been considered. These would entail major changes to the way mobile clients interact with the server and have thus been ruled out.
Additional context
Server-side checksums can already be requested by querying the <oc:checksums /> property of files. Clients can also request that the server hashes a given file on demand using ChecksumUpdatePlugin.
The implementation of this concept is part of an academic project. Any comments, discussions or contributions on the implementation or viability of the proposed solution are welcome.