Skip to content

fix(discovery): check quota before upload (during discovery)#9777

Open
solracsf wants to merge 1 commit intomasterfrom
checkQuotaBeforeUpload
Open

fix(discovery): check quota before upload (during discovery)#9777
solracsf wants to merge 1 commit intomasterfrom
checkQuotaBeforeUpload

Conversation

@solracsf
Copy link
Copy Markdown
Member

@solracsf solracsf commented Apr 2, 2026

Fixes #4580 (more an enhancement of actual behavior)

Related to nextcloud/server#51977
Related to nextcloud/server#59398

Quota is now checked during discovery, before any data is transmitted. If a file exceeds available quota it receives a DetailError immediately, with no retry scheduled. A _quotaBytesReserved counter prevents multiple files from being approved when their combined size exceeds quota.

The propagator's pre-upload guard is also improved: it now walks the folder hierarchy to find the nearest quota entry, and the propagator is seeded with PROPFIND quota data at the start of each cycle. Combined with nextcloud/server#59398 and nextcloud/groupfolders#4539 this makes this behavior almost full proof.

4 new tests cover: single file blocked, unknown quota allowed, chunked upload blocked, and two files exceeding combined quota.

@solracsf solracsf force-pushed the checkQuotaBeforeUpload branch from 114c6ee to 1f866cb Compare April 2, 2026 13:56
@solracsf solracsf changed the title fix(discovery): check quota before upload fix(discovery): check quota before upload (during discovery) Apr 2, 2026
@solracsf solracsf force-pushed the checkQuotaBeforeUpload branch 3 times, most recently from 091d2a9 to 399b158 Compare April 3, 2026 05:42
@solracsf solracsf marked this pull request as ready for review April 3, 2026 06:08
@solracsf
Copy link
Copy Markdown
Member Author

solracsf commented Apr 3, 2026

solar-scanner missing is out of scope of this PR
(#9786 should fix it)

@mgallien
Copy link
Copy Markdown
Collaborator

mgallien commented Apr 3, 2026

solar-scanner missing is out of scope of this PR (#9786 should fix it)

sorry for the mess
my bad

@mgallien mgallien force-pushed the checkQuotaBeforeUpload branch from 399b158 to e425898 Compare April 3, 2026 08:35
@sonarqubecloud

This comment was marked as outdated.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@solracsf solracsf force-pushed the checkQuotaBeforeUpload branch from e425898 to dcb2b54 Compare April 3, 2026 09:24
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

Artifact containing the AppImage: nextcloud-appimage-pr-9777.zip

Digest: sha256:f317a75d4b21a4393c517deace59c6c03d1eea104c5eca79702ced945397782e

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check for server quota before trying to upload files

2 participants