mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-11-26 18:16:47 -05:00
A space image is only ever shown as a thumbnail. When a file larger than the thumbnail generator accepts was set as the image of a space, the PATCH of the drive succeeded, but no thumbnail could be made of the file, so the space showed no image and nobody got an error. Before setting the image, graph now looks up the size of the file, and refuses a file above the limit with 413 Request Entity Too Large, without changing the space. The limit is the one of the thumbnail generator: graph reads it under the same names as the webdav and thumbnails services (OC_THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE and the older THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE, 50MB by default, empty for unlimited), so one setting keeps the three in agreement. GRAPH_THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE sets a lower limit for space images alone. The default of 50MB is now one constant, which the graph, webdav and thumbnails services all use. Only the file size is checked: the dimension limits of the generator would need the whole image to be read. The space readme has no limit, and an empty image id is passed on unchecked, as before. Assisted-by: Claude Code:claude-opus-5-5