mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix(server): thumbnail content type not being passed to stream handle (#3137)
* asset mimetype instead of application/octet-stream * use thumbnail mimetype instead * narrowed openapi spec * thumbnail format validation * JPEG fallback, `getThumbnailPath` returns format * return content type in `getThumbnailPath` * moved `format` validation to dto * removed unused import * moved fallback warning * added `ApiOkResponse`
This commit is contained in:
parent
d590dec159
commit
a5cc408469
7 changed files with 35 additions and 14 deletions
|
|
@ -43,7 +43,11 @@ export class PersonController {
|
|||
}
|
||||
|
||||
@Get(':id/thumbnail')
|
||||
@ApiOkResponse({ content: { 'application/octet-stream': { schema: { type: 'string', format: 'binary' } } } })
|
||||
@ApiOkResponse({
|
||||
content: {
|
||||
'image/jpeg': { schema: { type: 'string', format: 'binary' } },
|
||||
},
|
||||
})
|
||||
getPersonThumbnail(@AuthUser() authUser: AuthUserDto, @Param() { id }: UUIDParamDto) {
|
||||
return this.service.getThumbnail(authUser, id).then(asStreamableFile);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue