nextcloud / nextcloud/server

Checksums on files / reliable up/download

Open
#11,138 34 comments 45 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement feature: dav feature: files high hotspot: file transfer performance
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

To have reliable up- and downloads, generating a checksum on server is needed.

Upload

  • client generates checksum
  • client uploads file with checksum
  • server checks checksum and stores it after successfull upload

Download

  • client retrieves file and checksum
  • client checks checksum

On backward compatibility:

Upload:

  • if no checksum is provided, e.g. legacy apps / 3rd party apps -> generate checksum on server

Download:

  • legacy clients can simply ignore checksum

Additional for Android Files we can check if files are already uploaded (despite on relying on file names).

(this was shortly discussed in NC15 planning meeting)


Additionally, the ability to request checksum of file via endpoint from https://github.com/nextcloud/server/issues/25949:

  • client detects that file with same name already exists
  • we do not know if it is the same file
  • client requests only for this file via new(?) endpoint a checksum
  • client compares it
  • only if this differs, it presents conflict resolution dialog

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the upload and download flows described in the issue, along with the proposed endpoint for retrieving a file checksum. The issue requires a design covering checksum generation, validation, storage, retrieval, backward compatibility, and Android file checks; done means these paths reliably detect transfers or conflicts without breaking legacy clients.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.