mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 01:11:46 +03:00
chore(server): optional originalMimeType in asset response payload (#10272)
* chore(server): optional originalMimeType in asset response payload * lint * Update web/src/lib/utils/asset-utils.ts Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> * fix permission of shared link * test * test * test * test server --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
@@ -270,6 +270,10 @@ const supportedImageMimeTypes = new Set([
|
||||
* Returns true if the asset is an image supported by web browsers, false otherwise
|
||||
*/
|
||||
export function isWebCompatibleImage(asset: AssetResponseDto): boolean {
|
||||
if (!asset.originalMimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return supportedImageMimeTypes.has(asset.originalMimeType);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user