Skip to content

fix(webdav): stream announced types without a converter to the generator - #3884

Merged
aduffeck merged 1 commit into
mainfrom
fix/webdav-generator-passthrough
Nov 3, 2026
Merged

aduffeck merged 1 commit into
mainfrom
fix/webdav-generator-passthrough

Conversation

@dschmidt

@dschmidt dschmidt commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

OC_THUMBNAILS_ADDITIONAL_SOURCE_TYPES promises that an announced type the generator cannot read answers 404, which implies the generator gets asked. It does not: sourceImage streamed only image/* through and demanded a preprocessor converter for everything else, so an announced application/pdf died in webdav with "no converter" before imagor ever saw it, although imagor renders PDFs (poppler is linked in both published images) once -upload-loader-accept lets application/pdf in.

A type without a converter is now streamed to the generator untouched, the same way images always were; text, audio and geogebra keep their converters. Nothing else widens: statSource still rejects every type outside the built-in list plus the additional source types before any download, so only announced types reach the generator.

Verified end to end against shumc/imagor:1.9.11 with -upload-loader-accept "image/*,application/pdf" and OC_THUMBNAILS_ADDITIONAL_SOURCE_TYPES=application/pdf: the PDF preview answers 200 image/jpeg, an uploaded zip answers 404 and never shows up in imagor's request log.

Found while reviewing #3883.

@codacy-production

codacy-production Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics -12 complexity

Metric Results
Complexity -12

View in Codacy

🟢 Coverage 100.00% diff coverage · +0.01% coverage variation

Metric Results
Coverage variation ✅ +0.01% coverage variation (-1.00%)
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (5b1efe5) 92699 25892 27.93%
Head commit (e462b8c) 92693 (-6) 25903 (+11) 27.94% (+0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3884) 7 7 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@dschmidt
dschmidt marked this pull request as ready for review November 3, 2026 10:40
@dschmidt
dschmidt requested a review from aduffeck November 3, 2026 10:40
@aduffeck
aduffeck merged commit 5d04403 into main Nov 3, 2026
61 of 62 checks passed
@aduffeck
aduffeck deleted the fix/webdav-generator-passthrough branch November 3, 2026 13:45
@openclouders openclouders mentioned this pull request Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants