Skip to content

feat: add mimeType to thumbnails - #81

Open
dschmidt wants to merge 1 commit into
mainfrom
feat/thumbnail-content-type
Open

dschmidt wants to merge 1 commit into
mainfrom
feat/thumbnail-content-type

Conversation

@dschmidt

@dschmidt dschmidt commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Adds @libre.graph.mimeType to the thumbnail schema.

A thumbnail is not always served in the type its item's type suggests. The case that forces this is an image a file carries inside: the cover art of an audio file is a png or a jpeg depending on the file, and the thumbnail keeps that type rather than being re-encoded. Without an annotation a client has to fetch the bytes to find out.

Microsoft Graph has no field for this: its thumbnail resource carries content, height, sourceItemId, url and width and says nothing about the type, hence the annotation. The name is Graph's own word for the concept, file.mimeType, which this spec already carries unprefixed: the type of some bytes, parsed, without the parameters a Content-Type header may bring along (Tika, for one, answers text/plain; charset=windows-1252).

Server side: opencloud-eu/opencloud#3210 indexes the embedded image's type and decides the served type from it; this annotation is how that reaches a client through $expand=thumbnails.

@dschmidt
dschmidt force-pushed the feat/thumbnail-content-type branch from 86fafbb to 3115e23 Compare October 19, 2026 12:10
@dschmidt dschmidt changed the title feat: say which media type a thumbnail is served in feat: add contentType to thumbnails Oct 19, 2026
@dschmidt
dschmidt force-pushed the feat/thumbnail-content-type branch from 3115e23 to 75eeaa9 Compare October 19, 2026 12:25
@dschmidt dschmidt changed the title feat: add contentType to thumbnails feat: add mimeType to thumbnails Oct 19, 2026
A thumbnail made from an image a file carries inside, audio cover art for one,
keeps that image's type rather than whatever the file's type usually maps to.
Without an annotation a client cannot know that before fetching the bytes.
@dschmidt
dschmidt marked this pull request as ready for review October 19, 2026 12:37

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant