Commit Graph
24153 Commits
Author SHA1 Message Date
Dominik Schmidt 4e85772b47 fix(webdav): stop the resolution ladder at 2048
The largest rung is the largest box a generator is asked for, and fill and stretch enlarge a small source to fill it, so the rungs above 2048 let a tiny image cost whatever 8K costs. Web asks for 1200 at most.
2026-10-20 16:56:28 +02:00
Dominik Schmidt 9b9b5ab6a2 Revert "fix(thumbnails): cap the box a request may ask for at 2048 per axis"
This reverts commit 89b5bdf964.
2026-10-20 16:55:57 +02:00
Dominik Schmidt 89b5bdf964 fix(thumbnails): cap the box a request may ask for at 2048 per axis
Only the source was bounded, while fill and stretch upscale, so a tiny image asked for at 7680 allocated accordingly. The pixel budget for animations and webdav's ladder above this are a follow-up.
2026-10-20 16:06:30 +02:00
Dominik Schmidt 97e8031935 fix(thumbnails): take a slot once the image is in, not before
The slots bound the decoding and the resizing, so a slow upload no longer occupies one while nothing is being computed.
2026-10-20 16:05:34 +02:00
Dominik Schmidt e871ebb64a fix(thumbnails): read the image part without the multipart form
The handler holds the whole image in memory to decode it; the form kept a second copy, on disk for anything past its memory limit, for no gain.
2026-10-20 16:03:42 +02:00
Dominik Schmidt 41b7160f3a fix(webdav): the source type belongs in the cache key
The same bytes uploaded under two types are not the same thumbnail: the type picks the extractor, and with Tika in front what it finds depends on it.
2026-10-20 16:03:06 +02:00
Dominik Schmidt 4f79fdf9bb fix(webdav): hash the checksum that becomes the cache key
The checksum is not this service's to trust, an OCM share takes it from a remote PROPFIND, and it ends up as a path on disk and as an S3 object key.
2026-10-20 16:02:39 +02:00
Dominik Schmidt ab29d4848f fix(webdav): keep the deprecated cache root pointing at its files directory
THUMBNAILS_FILESYSTEMSTORAGE_ROOT named the directory the old service kept files/ in, so reading it as the cache directory moved the cache one level up and left the existing thumbnails behind.
2026-10-20 16:01:52 +02:00
Dominik Schmidt 56d96d2df8 fix(webdav): say it when the thumbnail cache fails to answer
Only a miss is silent now; every other error from the cache is logged instead of disappearing behind a regenerated thumbnail.
2026-10-20 14:59:08 +02:00
Dominik Schmidt 260d6f0bbd fix(webdav): a missing s3 bucket is not a cache miss
Matching any 404 let a typo in the bucket name read as a miss on every lookup; only NoSuchKey, and a 404 that carries no code at all, are misses now.
2026-10-20 14:58:46 +02:00
Dominik Schmidt 3ff5a34ceb fix(thumbnails): decode one frame of a gif asked for as a still
imaging.Decode is DecodeAll plus SingleFrame, so a gif renamed to .png held every frame in memory; the frame limit only guards the gif output path.
2026-10-20 14:58:31 +02:00
Dominik Schmidt fa73366ff0 fix(webdav): read the generator's status before the writer's error
A 429 or 413 is answered without reading the body, which breaks the write; the broken pipe used to mask the status. A 413 now reads as too large, not as a server fault.
2026-10-20 14:58:09 +02:00
Dominik Schmidt 89e2f42d7c refactor(webdav): ask ForType for options, not for an any map 2026-10-19 15:16:06 +02:00
Dominik Schmidt ee4465f500 fix(webdav): stop refusing a type mapping on a guess about the generator 2026-10-19 14:57:36 +02:00
Dominik Schmidt 48f9990a41 fix(webdav): ask the generator for the smart crop
A cropping resize now carries imagor's smart segment, which is how the libvips
build and a real imagor keep the region that carries the image, the way main
cropped before the generator moved out. A build without libvips answers the
same request with a centre crop, and the parity suite records that.
2026-10-19 14:57:36 +02:00
Dominik Schmidt c980083938 docs: say less in the comments, and name what matchOperation returns 2026-10-19 14:57:36 +02:00
Dominik Schmidt 999ad6fb7c fix: answer the review from @orgaralf
Both builds and imagor now crop the same region, a gif is bounded by its
declared frames, the posted body by THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE and an
image extracted from a container by the configured input size. The s3 cache
reads a miss where minio reports it.

The push endpoint's HTTP behaviour is asserted in the parity suite now, where
imagor answers the same request, so 41 duplicated service specs are gone and
the 32 that remain are what a non-default config or a helper decides.
2026-10-19 14:57:36 +02:00
Dominik Schmidt a6fcc8dc58 docs: the thumbnail settings are only checked with previews enabled
Two readme sentences promised a startup refusal without saying that nothing reads these settings when OC_DISABLE_PREVIEWS is set, so a typo surfaces when previews come back on.
2026-10-19 14:57:36 +02:00
Dominik Schmidt 4da8971ca7 docs: say what the code does, in the places that still described something else
The aspect-ignored header blamed a processor for a decision the free axis can make too. fit-in does not letterbox, it answers smaller than the box. The s3 cache checks bucket, region and credentials, not the endpoint. A mapping onto a type the generator cannot write is refused at startup instead of quietly becoming a JPEG. And a processor name nobody knows resolves like none, which three comments and a readme line still denied.
2026-10-19 14:57:35 +02:00
Dominik Schmidt e981a06f87 refactor(thumbnails): one table for the output formats, one fit-in
The four writable formats were a whitelist in the filter parser and a second list of content types in the encode step; they are one map now, so a format nobody writes stays a 400 and one without an encoder in this build stays a 406. The fit-in shape existed twice since the gif loop started rounding like vips, it lives in box.go now. And the push routes are back inline: mountPushRoutes only existed so a test mux could not drift from them, and the specs go through the real NewService instead.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 1da9fa8013 fix: answer the third review round
With previews off a thumbnail path answered 405, because the REPORT patterns match the same paths and the GET routes were left out; the routes stay now and the shared parse step answers 404, which is what the setting promises. The deprecated cache directory is read again: its default no longer sits in the config struct, where it made the fallback unreachable. A processor nobody knows is treated like none, in the parser too. A comma-joined resolutions entry in yaml keeps working. Plus the comments and the readme line that described something else than the code does.
2026-10-19 14:57:35 +02:00
Dominik Schmidt c5c5ec2e2c refactor(webdav): own the list of types a preview is announced for
The thumbnails service kept a single map of supported mime types that nothing in that service used any more, only webdav read it, and the comment still claimed reva reads it there. It is webdav's announcement, so DefaultSourceTypes lives next to SourceTypes now, the leftover package is gone, and no webdav file imports the thumbnails service any longer.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 67856fdf6d fix: the small things the review left over
A processor that needs the whole box is not a cropping one, so targetsExactBox says what it decides. An output format without an encoder answers 406 like every other thing this build cannot write. The configured defaults are no longer seeded twice, the constructors merge them anyway, like they do for the source types. And webp needs no build tag: both builds read it, the pure Go one answers the JPEG the mapping asks for, which the parity suite pins.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 18c5d726db refactor(thumbnails): let the backend answer for the image it decodes
The dimension guard and the input-format detection used Go's decoder registry in both builds, so with libvips they were silently skipped for everything Go cannot read, and a webp source came back as a JPEG where imagor keeps it a webp. Each build now reads the header with the library that will decode the image, the guard runs on that, and the animated gif path is shared instead of living in both encoders. The hook names stay per build, the function variables are typed per build, so the any and its seven type assertions are gone.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 3572410fc4 fix: answer the review, and read imagor's path the way imagor does
The push endpoint takes an empty filters segment, ignores an image key behind the box and computes a side given as 0 from the other one, all measured against both imagors and pinned in the parity suite. Plus the review leftovers: no em dashes, the request test on ginkgo, comments that contradicted the code, one stat for Head and generate, one thumbnail handler, the gif fit-in rounding of vips, and the new env names last so they win.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 85b7cccc02 docs: fix what the thumbnail readmes get wrong
The a and processor defaults, that every named processor overrules a, the shared OC_THUMBNAIL_* names, the gif output type, the ladder making the response a different size, the empty filters segment that answers 404, and 406 instead of 400 for a format the build cannot write.
2026-10-19 14:57:35 +02:00
Dominik Schmidt f4792a0b02 fix(webdav): keep the acceptance contract for previews
An explicit x=0 or y=0 is an error again, only an omitted axis is unconstrained, and the text preview fixtures carry the resolution the generator writes now.
2026-10-19 14:57:35 +02:00
Dominik Schmidt eb6d1021a3 test(thumbnails): put the push endpoint on ginkgo
The repeated post-and-assert bodies collapse into tables, and the sources
are built without gomega because they run while the spec tree is built.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 9b4e173020 test(thumbnails): compare the built-in generator against two real imagors
The same image goes to the built-in generator and to both imagor images,
and status, dimensions, format, frames and alpha are compared. A generator
that answers differently is held to that answer by a recorded override, so
the test fails once the divergence disappears. It runs once per resize
implementation, because make test builds the pure Go path while the images
ship vips.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 6c9dc28599 refactor: one gif resize, a request struct, half the routes
The gif loop is shared by both builds, the executor takes a request
struct, the route table halves, the aspect flag is a pointer instead of
two bools, and the cache's budget is named after what it is.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 99c7666ad2 fix(webdav): make the legacy a flag mean something again
An unconstrained axis is fitted instead of refused, a decides when the
client sent it, and an empty resolution ladder is refused at startup
instead of letting the client pick the cache key.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 918c2baa7d fix(webdav): refuse what it cannot serve and pass the generator through
A cache backend nobody can serve fails at startup instead of dropping
entries silently, the memory backend is bounded, a busy generator's 429
reaches the client with its Retry-After, and a 400 from the generator is
read as this service's own bug instead of a missing preview.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 70002306a8 docs: describe the push endpoint and the preview settings as they are
The fixtures are named after what they are, and the leftovers of the
deleted grpc service are gone.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 2267b6d3bc fix(thumbnails): answer like imagor, and write what imagor writes
The upload part has to be typed, a malformed request is a 400 while a
source it cannot read is a 406, an animated gif flattens when the output
is still, a still source can be written as a gif, libvips writes webp, and
fit-in rounds the way vips and imagor round it.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 9879927f4f refactor(webdav): a converter returns the image bytes and their type
A converter that found nothing returns nil, so the workflow decides what to
do with it instead of reading an error.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 32f4ee02e8 feat(webdav): let a deployment add the types a preview is made of
webdav, graph and ocdav read the same list, so a configured type is
announced and attempted by all three. A type the generator cannot answer
is refused at startup, and ocdav takes the types from its own
configuration instead of importing an OpenCloud package, which the
vendored reva carries until opencloud-eu/reva#885 lands.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 07d6829bd6 fix(webdav): hand an embedded image to the generator as it was found
Nothing is decoded in webdav any more, which also ends the libvips build
split in the preview path.
2026-10-19 14:57:35 +02:00
Dominik Schmidt de467d7dd8 feat(webdav): write a thumbnail in the type the source maps to
A source type maps onto the type its thumbnail is returned in, and that
type is asked for by the name the generator knows it under. The answer
carries that type whether it was just generated or came from the cache,
which is also what the cache key says.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 0f734ac32c fix(webdav): type the upload part and answer the small things
The multipart part carries the source's own type, because imagor's upload
loader accepts image/* only. A public link that needs a password is a 404 again, a preview carries
nosniff and a content length, and the input size limit is read with reva's
bytesize again.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 4c0768cb83 fix(webdav): name the thumbnail config fields after what they configure
The yaml keys stay as they are, so a config file written against them keeps
working, and OC_DISABLE_PREVIEWS is back without disabling search.
2026-10-19 14:57:35 +02:00
Dominik Schmidt 95fcc4c623 fix(webdav): snap each thumbnail axis onto a ladder of edge lengths
Each axis is rounded up on its own, so a square request can no longer land
in a landscape box, and the cache is keyed on the snapped box.
2026-10-19 14:57:35 +02:00
Jörn Friedrich Dreyer 203708474e refactor(thumbnails): remove the pull-based pipeline
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-10-19 14:57:35 +02:00
Jörn Friedrich Dreyer 81d0a86c35 refactor(webdav): drive the thumbnail workflow via the push-based generator
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-10-19 14:57:35 +02:00
Jörn Friedrich Dreyer 924d7428ed feat(thumbnails): add imagor-compatible push-based thumbnail endpoint
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2026-10-19 14:56:58 +02:00
Viktor Scharf 8517f84ea3 tests: add acceptance tests for sharing with guests via email (#3751)
Share resources with an email address via the sharingNg API and access them with the guest link from the email.
2026-10-19 11:39:48 +02:00
Alex Ababii 6bb1f2e859 Merge pull request #3743 from maki5/fix/activitylog_display_guestuser_name
fix(activitylog): fix for guestuser display name in activity list
2026-10-19 11:39:18 +02:00
Alex Ababii fc1a055997 Merge pull request #3745 from maki5/fix/authguest_readme
fix(authguest): fix diagram parsing in readme
2026-10-19 09:11:26 +02:00
opencloudeu 1d4308e36f [tx] updated from transifex 2026-10-17 23:16:56 +00:00
opencloudeu 6b50d80752 [tx] updated from transifex 2026-10-16 23:17:06 +00:00
Florian Schade 3cc47747af Merge pull request #3730 from fschade/feat-collaboration-checkfileinfo-gaps
feat(collaboration): close the CheckFileInfo gaps for the office apps
2026-10-16 17:05:49 +02:00