From 73f4883f36127111857a890b9d33faeba9d8eadf Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 14 Aug 2020 15:50:39 +0200 Subject: [PATCH] Do not preview tiff. --- frontend/app/shared/services/assets.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/app/shared/services/assets.service.ts b/frontend/app/shared/services/assets.service.ts index f7f2d217b..882f48aa1 100644 --- a/frontend/app/shared/services/assets.service.ts +++ b/frontend/app/shared/services/assets.service.ts @@ -14,6 +14,8 @@ import { encodeQuery, Query } from './../state/query'; import { AuthService } from './auth.service'; const SVG_PREVIEW_LIMIT = 10 * 1024; +const MIME_TIFF = 'image/tiff'; +const MIME_SVG = 'image/svg+xml'; export class AssetsDto extends ResultSet { public get canCreate() { @@ -61,7 +63,7 @@ export class AssetDto { public readonly tags: ReadonlyArray, public readonly version: Version ) { - this.canPreview = this.type === 'Image' || (this.mimeType === 'image/svg+xml' && this.fileSize < SVG_PREVIEW_LIMIT); + this.canPreview = (this.type === 'Image' && this.mimeType !== MIME_TIFF) || (this.mimeType === MIME_SVG && this.fileSize < SVG_PREVIEW_LIMIT); this._links = links;