File previewer (#10260)

Add a file previewer for pdf, image, doc, xls

<img width="991" alt="Screenshot 2025-02-17 at 15 03 10"
src="https://github.com/user-attachments/assets/7516c13d-d6cb-4a10-b10f-b422268d223b"
/>
This commit is contained in:
Félix Malfait
2025-02-18 10:18:59 +01:00
committed by GitHub
parent 270744eca6
commit 103dff4bd0
13 changed files with 573 additions and 21 deletions

View File

@ -110,6 +110,9 @@ export class ClientConfig {
@Field(() => Support)
support: Support;
@Field(() => Boolean)
isAttachmentPreviewEnabled: boolean;
@Field(() => Sentry)
sentry: Sentry;

View File

@ -75,6 +75,9 @@ export class ClientConfigResolver {
'MUTATION_MAXIMUM_AFFECTED_RECORDS',
),
},
isAttachmentPreviewEnabled: this.environmentService.get(
'IS_ATTACHMENT_PREVIEW_ENABLED',
),
analyticsEnabled: this.environmentService.get('ANALYTICS_ENABLED'),
canManageFeatureFlags:
this.environmentService.get('NODE_ENV') ===

View File

@ -970,6 +970,15 @@ export class EnvironmentVariables {
@CastToPositiveNumber()
@IsOptional()
HEALTH_MONITORING_TIME_WINDOW_IN_MINUTES = 5;
@EnvironmentVariablesMetadata({
group: EnvironmentVariablesGroup.Other,
description: 'Enable or disable the attachment preview feature',
})
@CastToBoolean()
@IsOptional()
@IsBoolean()
IS_ATTACHMENT_PREVIEW_ENABLED = true;
}
export const validate = (