From f1effcee27e29a0c381f4396c5e6d6959b79d24b Mon Sep 17 00:00:00 2001 From: SevenWaysDP <97111299+SevenWaysDP@users.noreply.github.com> Date: Fri, 27 Oct 2023 06:58:01 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20hpi-schu?= =?UTF-8?q?l-cloud/schulcloud-server@84c44c1bf99f92b16df1c32792b5670dbb2b4?= =?UTF-8?q?d72=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/ErrorMapper.html | 4 +- classes/FileDto.html | 19 +- classes/FileRecordSecurityCheck.html | 19 +- classes/PreviewActionsLoggable.html | 316 + classes/PreviewBuilder.html | 408 ++ classes/PreviewGeneratorBuilder.html | 292 + classes/RpcMessageProducer.html | 559 ++ controllers/FilesStorageController.html | 64 +- coverage.html | 234 +- entities/FileRecord.html | 27 +- graph/dependencies.svg | 6004 ++++++++-------- injectables/FilesStorageConsumer.html | 36 +- injectables/FilesStorageProducer.html | 343 +- injectables/FilesStorageService.html | 58 +- injectables/FilesStorageUC.html | 51 +- injectables/PreviewGeneratorConsumer.html | 357 + injectables/PreviewGeneratorService.html | 584 ++ injectables/PreviewProducer.html | 645 ++ injectables/PreviewService.html | 453 +- interfaces/CopyFiles.html | 1 - interfaces/File.html | 40 - interfaces/GetFile.html | 1 - interfaces/GetFileResponse.html | 7 +- interfaces/IError.html | 6 +- interfaces/IFileRecordProperties.html | 7 + .../IFileRecordSecurityCheckProperties.html | 7 + interfaces/IFileStorageConfig.html | 8 +- interfaces/IParentInfo.html | 7 + interfaces/PreviewConfig.html | 266 + interfaces/PreviewFileOptions.html | 309 + interfaces/PreviewFileParams.html | 98 +- interfaces/PreviewModuleConfig.html | 266 + interfaces/PreviewOptions.html | 276 + interfaces/PreviewResponseMessage.html | 270 + interfaces/RpcMessage.html | 2 +- interfaces/S3Config-1.html | 1 - js/menu-wc.js | 62 +- js/menu-wc_es5.js | 2 +- js/search/search_index.js | 4 +- miscellaneous/enumerations.html | 26 + miscellaneous/functions.html | 167 + miscellaneous/variables.html | 66 +- modules.html | 49 + modules/AccountApiModule.html | 54 +- modules/AccountApiModule/dependencies.svg | 54 +- modules/AccountModule.html | 120 +- modules/AccountModule/dependencies.svg | 120 +- modules/AuthenticationModule.html | 160 +- modules/AuthenticationModule/dependencies.svg | 160 +- modules/AuthorizationReferenceModule.html | 8 +- .../dependencies.svg | 8 +- modules/CacheWrapperModule.html | 8 +- modules/CacheWrapperModule/dependencies.svg | 8 +- modules/ClassModule.html | 8 +- modules/ClassModule/dependencies.svg | 8 +- .../CollaborativeStorageAdapterModule.html | 8 +- .../dependencies.svg | 8 +- modules/CommonToolModule.html | 8 +- modules/CommonToolModule/dependencies.svg | 8 +- modules/ConsoleWriterModule.html | 8 +- modules/ConsoleWriterModule/dependencies.svg | 8 +- modules/ExternalToolModule.html | 152 +- modules/ExternalToolModule/dependencies.svg | 152 +- modules/FileSystemModule.html | 8 +- modules/FileSystemModule/dependencies.svg | 8 +- modules/FilesModule.html | 46 +- modules/FilesModule/dependencies.svg | 46 +- modules/FilesStorageAMQPModule.html | 46 +- .../FilesStorageAMQPModule/dependencies.svg | 46 +- modules/FilesStorageModule.html | 2 + modules/FwuLearningContentsModule.html | 70 +- .../dependencies.svg | 70 +- modules/GroupApiModule.html | 78 +- modules/GroupApiModule/dependencies.svg | 78 +- modules/H5PEditorModule.html | 46 +- modules/H5PEditorModule/dependencies.svg | 46 +- modules/KeycloakConfigurationModule.html | 112 +- .../dependencies.svg | 112 +- modules/KeycloakModule.html | 74 +- modules/KeycloakModule/dependencies.svg | 74 +- modules/LearnroomApiModule.html | 166 +- modules/LearnroomApiModule/dependencies.svg | 166 +- modules/LearnroomModule.html | 178 +- modules/LearnroomModule/dependencies.svg | 178 +- modules/LegacySchoolApiModule.html | 62 +- .../LegacySchoolApiModule/dependencies.svg | 62 +- modules/LegacySchoolModule.html | 8 +- modules/LegacySchoolModule/dependencies.svg | 8 +- modules/LessonApiModule.html | 38 +- modules/LessonApiModule/dependencies.svg | 38 +- modules/LessonModule.html | 8 +- modules/LessonModule/dependencies.svg | 8 +- modules/LoggerModule.html | 8 +- modules/LoggerModule/dependencies.svg | 8 +- modules/OauthApiModule.html | 102 +- modules/OauthApiModule/dependencies.svg | 102 +- modules/OauthModule.html | 136 +- modules/OauthModule/dependencies.svg | 136 +- modules/OauthProviderApiModule.html | 110 +- .../OauthProviderApiModule/dependencies.svg | 110 +- modules/OauthProviderModule.html | 112 +- modules/OauthProviderModule/dependencies.svg | 112 +- modules/PreviewGeneratorAMQPModule.html | 240 + .../dependencies.svg | 50 + modules/PreviewGeneratorConsumerModule.html | 269 + modules/PreviewGeneratorProducerModule.html | 309 + .../dependencies.svg | 94 + modules/ProvisioningModule.html | 128 +- modules/ProvisioningModule/dependencies.svg | 128 +- modules/PseudonymModule.html | 90 +- modules/PseudonymModule/dependencies.svg | 90 +- modules/RabbitMQWrapperModule.html | 6 +- modules/RabbitMQWrapperTestModule.html | 10 +- modules/SchoolExternalToolModule.html | 66 +- .../SchoolExternalToolModule/dependencies.svg | 66 +- modules/SharingApiModule.html | 78 +- modules/SharingApiModule/dependencies.svg | 78 +- modules/SharingModule.html | 98 +- modules/SharingModule/dependencies.svg | 98 +- modules/SystemModule.html | 64 +- modules/SystemModule/dependencies.svg | 64 +- modules/TaskApiModule.html | 86 +- modules/TaskApiModule/dependencies.svg | 86 +- modules/TaskModule.html | 112 +- modules/TaskModule/dependencies.svg | 112 +- modules/TeamsModule.html | 8 +- modules/TeamsModule/dependencies.svg | 8 +- modules/ToolModule.html | 104 +- modules/ToolModule/dependencies.svg | 104 +- modules/UserLoginMigrationModule.html | 144 +- .../UserLoginMigrationModule/dependencies.svg | 144 +- modules/VideoConferenceApiModule.html | 70 +- .../VideoConferenceApiModule/dependencies.svg | 70 +- modules/VideoConferenceModule.html | 140 +- .../VideoConferenceModule/dependencies.svg | 140 +- overview.html | 6012 +++++++++-------- 136 files changed, 15846 insertions(+), 9827 deletions(-) create mode 100644 classes/PreviewActionsLoggable.html create mode 100644 classes/PreviewBuilder.html create mode 100644 classes/PreviewGeneratorBuilder.html create mode 100644 classes/RpcMessageProducer.html create mode 100644 injectables/PreviewGeneratorConsumer.html create mode 100644 injectables/PreviewGeneratorService.html create mode 100644 injectables/PreviewProducer.html create mode 100644 interfaces/PreviewConfig.html create mode 100644 interfaces/PreviewFileOptions.html create mode 100644 interfaces/PreviewModuleConfig.html create mode 100644 interfaces/PreviewOptions.html create mode 100644 interfaces/PreviewResponseMessage.html create mode 100644 modules/PreviewGeneratorAMQPModule.html create mode 100644 modules/PreviewGeneratorAMQPModule/dependencies.svg create mode 100644 modules/PreviewGeneratorConsumerModule.html create mode 100644 modules/PreviewGeneratorProducerModule.html create mode 100644 modules/PreviewGeneratorProducerModule/dependencies.svg diff --git a/classes/ErrorMapper.html b/classes/ErrorMapper.html index b13b89ec808..47588d3ffab 100644 --- a/classes/ErrorMapper.html +++ b/classes/ErrorMapper.html @@ -68,7 +68,7 @@
- apps/server/src/modules/files-storage-client/mapper/error.mapper.ts
+ apps/server/src/shared/infra/rabbitmq/error.mapper.ts
+
+ File
+
import { Readable } from 'stream';
+ import { File } from '@shared/infra/s3-client';
+import { Readable } from 'stream';
-export class FileDto {
+export class FileDto implements File {
constructor(file: FileDto) {
this.name = file.name;
this.data = file.data;
diff --git a/classes/FileRecordSecurityCheck.html b/classes/FileRecordSecurityCheck.html
index 0c79b365782..2ac46cb99a3 100644
--- a/classes/FileRecordSecurityCheck.html
+++ b/classes/FileRecordSecurityCheck.html
@@ -133,7 +133,7 @@ Constructor
-
+
@@ -204,7 +204,7 @@
-
+
@@ -245,7 +245,7 @@
-
+
@@ -287,7 +287,7 @@
-
+
@@ -328,7 +328,7 @@
-
+
@@ -363,7 +363,7 @@
-
+
@@ -386,6 +386,7 @@
import { ObjectId } from '@mikro-orm/mongodb';
import { BadRequestException } from '@nestjs/common';
import { BaseEntityWithTimestamps, EntityId } from '@shared/domain';
+import path from 'path';
import { v4 as uuid } from 'uuid';
import { ErrorType } from '../error';
import { PreviewInputMimeTypes } from '../interface/preview-input-mime-types.enum';
@@ -677,6 +678,12 @@
return PreviewStatus.PREVIEW_NOT_POSSIBLE_SCAN_STATUS_ERROR;
}
+
+ public get fileNameWithoutExtension(): string {
+ const filenameObj = path.parse(this.name);
+
+ return filenameObj.name;
+ }
}
+
+ apps/server/src/shared/infra/preview-generator/loggable/preview-actions.loggable.ts
+
+
+ Loggable
+
+ Methods+ |
+
+
|
+
+constructor(message: string, payload: PreviewFileOptions)
+ |
+ |||||||||
+ + | +|||||||||
+
+ Parameters :
+
+
|
+
+ + + getLogMessage + + + | +
+getLogMessage()
+ |
+
+ + | +
+
+
+ Returns :
+ LogMessage
+
+ |
+
import { LogMessage, Loggable } from '@src/core/logger';
+import { PreviewFileOptions } from '../interface';
+
+export class PreviewActionsLoggable implements Loggable {
+ constructor(private readonly message: string, private readonly payload: PreviewFileOptions) {}
+
+ getLogMessage(): LogMessage {
+ const { originFilePath, previewFilePath, previewOptions } = this.payload;
+ return {
+ message: this.message,
+ data: {
+ originFilePath,
+ previewFilePath,
+ format: previewOptions.format,
+ width: previewOptions.width,
+ },
+ };
+ }
+}
+
+ +
+ apps/server/src/modules/files-storage/mapper/preview.builder.ts
+
+ Methods+ |
+
+
|
+
+ + + Static + buildParams + + + | +||||||||||||
+
+ buildParams(fileRecord: FileRecord, previewParams: PreviewParams, bytesRange: string | undefined)
+ |
+ ||||||||||||
+ + | +||||||||||||
+
+
+ Parameters :
+
+
+
+ Returns :
+ PreviewFileParams
+
+
+
+
+ |
+
+ + + Static + buildPayload + + + | +||||||
+
+ buildPayload(params: PreviewFileParams)
+ |
+ ||||||
+ + | +||||||
+
+
+ Parameters :
+
+
+
+ Returns :
+ PreviewFileOptions
+
+
+
+
+ |
+
import { PreviewFileOptions } from '@shared/infra/preview-generator';
+import { PreviewParams } from '../controller/dto';
+import { FileRecord } from '../entity';
+import { createPath, createPreviewFilePath, createPreviewNameHash, getFormat } from '../helper';
+import { PreviewFileParams } from '../interface';
+
+export class PreviewBuilder {
+ public static buildParams(
+ fileRecord: FileRecord,
+ previewParams: PreviewParams,
+ bytesRange: string | undefined
+ ): PreviewFileParams {
+ const { schoolId, id, mimeType } = fileRecord;
+ const originFilePath = createPath(schoolId, id);
+ const format = getFormat(previewParams.outputFormat ?? mimeType);
+
+ const hash = createPreviewNameHash(id, previewParams);
+ const previewFilePath = createPreviewFilePath(schoolId, hash, id);
+
+ const previewFileParams = {
+ fileRecord,
+ previewParams,
+ hash,
+ previewFilePath,
+ originFilePath,
+ format,
+ bytesRange,
+ };
+
+ return previewFileParams;
+ }
+
+ public static buildPayload(params: PreviewFileParams): PreviewFileOptions {
+ const { originFilePath, previewFilePath, previewParams, format } = params;
+
+ const payload = {
+ originFilePath,
+ previewFilePath,
+ previewOptions: {
+ format,
+ width: previewParams.width,
+ },
+ };
+
+ return payload;
+ }
+}
+
+ +
+ apps/server/src/shared/infra/preview-generator/preview-generator.builder.ts
+
+ Methods+ |
+
+
|
+
+ + + Static + buildFile + + + | +|||||||||
+
+ buildFile(preview: PassThrough, previewOptions: PreviewOptions)
+ |
+ |||||||||
+ + | +|||||||||
+
+
+ Parameters :
+
+
+
+ Returns :
+ File
+
+
+
+
+ |
+
import { File } from '@shared/infra/s3-client';
+import { PassThrough } from 'stream';
+import { PreviewOptions } from './interface';
+
+export class PreviewGeneratorBuilder {
+ public static buildFile(preview: PassThrough, previewOptions: PreviewOptions): File {
+ const { format } = previewOptions;
+
+ const file = {
+ data: preview,
+ mimeType: format,
+ };
+
+ return file;
+ }
+}
+
+ +
+ apps/server/src/shared/infra/rabbitmq/rpc-message-producer.ts
+
+ Methods+ |
+
+
|
+
+constructor(amqpConnection: AmqpConnection, exchange: string, timeout: number)
+ |
+
+ + | +
+ + | +
+ + + Protected + checkError + + + | +||||||
+
+ checkError(response: RpcMessage<T>)
+ |
+ ||||||
+ + | +||||||
+ Type parameters :
+
|
+ ||||||
+
+
+ Parameters :
+
+
+
+ Returns :
+ void
+
+
+
+
+ |
+
+ + + Protected + createRequest + + + | +|||||||||
+
+ createRequest(event: string, payload)
+ |
+ |||||||||
+ + | +|||||||||
+
+
+ Parameters :
+
+
+
+ Returns :
+ { exchange: string; routingKey: string; payload: unknown; timeout: number; }
+
+
+
+
+ |
+
+ + + Protected + Async + request + + + | +|||||||||
+
+ request(event: string, payload)
+ |
+ |||||||||
+ + | +|||||||||
+ Type parameters :
+
|
+ |||||||||
+
+
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+
+ |
+
import { AmqpConnection } from '@golevelup/nestjs-rabbitmq';
+import { ErrorMapper } from './error.mapper';
+import { RpcMessage } from './rpc-message';
+
+export abstract class RpcMessageProducer {
+ constructor(
+ protected readonly amqpConnection: AmqpConnection,
+ protected readonly exchange: string,
+ protected readonly timeout: number
+ ) {}
+
+ protected async request<T>(event: string, payload: unknown) {
+ const response = await this.amqpConnection.request<RpcMessage<T>>(this.createRequest(event, payload));
+
+ this.checkError<T>(response);
+ return response.message;
+ }
+
+ // need to be fixed with https://ticketsystem.dbildungscloud.de/browse/BC-2984
+ // mapRpcErrorResponseToDomainError should also removed with this ticket
+ protected checkError<T>(response: RpcMessage<T>) {
+ const { error } = response;
+ if (error) {
+ const domainError = ErrorMapper.mapRpcErrorResponseToDomainError(error);
+ throw domainError;
+ }
+ }
+
+ protected createRequest(event: string, payload: unknown) {
+ return {
+ exchange: this.exchange,
+ routingKey: event,
+ payload,
+ timeout: this.timeout,
+ };
+ }
+}
+
+ @ApiOperation({summary: 'Streamable download of a preview file.'})
@ApiResponse({status: 200, type: StreamableFile})
@ApiResponse({status: 206, type: StreamableFile})
@ApiResponse({status: 400, type: ApiValidationError})
@ApiResponse({status: 403, type: ForbiddenException})
@ApiResponse({status: 404, type: NotFoundException})
@ApiResponse({status: 422, type: UnprocessableEntityException})
@ApiResponse({status: 500, type: InternalServerErrorException})
@ApiHeader({name: 'Range', required: false})
@Get('/preview/:fileRecordId/:fileName')
+ @ApiOperation({summary: 'Streamable download of a preview file.'})
@ApiResponse({status: 200, type: StreamableFile})
@ApiResponse({status: 206, type: StreamableFile})
@ApiResponse({status: 400, type: ApiValidationError})
@ApiResponse({status: 403, type: ForbiddenException})
@ApiResponse({status: 404, type: NotFoundException})
@ApiResponse({status: 422, type: UnprocessableEntityException})
@ApiResponse({status: 500, type: InternalServerErrorException})
@ApiHeader({name: 'Range', required: false})
@Get('/preview/:fileRecordId/:fileName')
@RequestTimeout(undefined.INCOMING_REQUEST_TIMEOUT)
import {
+ import { Authenticate, CurrentUser, ICurrentUser } from '@modules/authentication';
+import {
BadRequestException,
Body,
ConflictException,
@@ -1685,10 +1688,10 @@
UseInterceptors,
} from '@nestjs/common';
import { ApiConsumes, ApiHeader, ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';
-import { ApiValidationError, RequestLoggingInterceptor } from '@shared/common';
+import { ApiValidationError, RequestLoggingInterceptor, RequestTimeout } from '@shared/common';
import { PaginationParams } from '@shared/controller';
-import { ICurrentUser, Authenticate, CurrentUser } from '@modules/authentication';
import { Request, Response } from 'express';
+import { config } from '../files-storage.config';
import { GetFileResponse } from '../interface';
import { FilesStorageMapper } from '../mapper';
import { FileRecordMapper } from '../mapper/file-record.mapper';
@@ -1789,6 +1792,7 @@
@ApiResponse({ status: 500, type: InternalServerErrorException })
@ApiHeader({ name: 'Range', required: false })
@Get('/preview/:fileRecordId/:fileName')
+ @RequestTimeout(config().INCOMING_REQUEST_TIMEOUT)
async downloadPreview(
@Param() params: DownloadFileParams,
@CurrentUser() currentUser: ICurrentUser,
diff --git a/coverage.html b/coverage.html
index 33202408308..ad5f6fd1c7a 100644
--- a/coverage.html
+++ b/coverage.html
@@ -187,6 +187,18 @@
(0/1)
+
+
+
+ apps/server/src/apps/preview-generator-consumer.app.ts
+
+ function
+ bootstrap
+
+ 0 %
+ (0/1)
+
+
@@ -3175,18 +3187,6 @@
(0/2)
-
-
-
- apps/server/src/modules/files-storage-client/mapper/error.mapper.ts
-
- class
- ErrorMapper
-
- 0 %
- (0/2)
-
-
@@ -3643,6 +3643,18 @@
(0/1)
+
+
+
+ apps/server/src/modules/files-storage/files-storage.config.ts
+
+ variable
+ defaultConfig
+
+ 0 %
+ (0/1)
+
+
@@ -3787,6 +3799,30 @@
(0/1)
+
+
+
+ apps/server/src/modules/files-storage/helper/file-record.ts
+
+ function
+ getFormat
+
+ 0 %
+ (0/1)
+
+
+
+
+
+ apps/server/src/modules/files-storage/helper/file-record.ts
+
+ function
+ getPreviewName
+
+ 0 %
+ (0/1)
+
+
@@ -3928,7 +3964,7 @@
PreviewFileParams
0 %
- (0/7)
+ (0/8)
@@ -3991,6 +4027,18 @@
(0/7)
+
+
+
+ apps/server/src/modules/files-storage/mapper/preview.builder.ts
+
+ class
+ PreviewBuilder
+
+ 0 %
+ (0/3)
+
+
@@ -4036,7 +4084,7 @@
PreviewService
0 %
- (0/11)
+ (0/8)
@@ -15511,6 +15559,150 @@
(0/17)
+
+
+
+ apps/server/src/shared/infra/preview-generator/interface/preview-consumer-config.ts
+
+ interface
+ PreviewConfig
+
+ 0 %
+ (0/3)
+
+
+
+
+
+ apps/server/src/shared/infra/preview-generator/interface/preview-consumer-config.ts
+
+ interface
+ PreviewModuleConfig
+
+ 0 %
+ (0/3)
+
+
+
+
+
+ apps/server/src/shared/infra/preview-generator/interface/preview.ts
+
+ interface
+ PreviewFileOptions
+
+ 0 %
+ (0/4)
+
+
+
+
+
+ apps/server/src/shared/infra/preview-generator/interface/preview.ts
+
+ interface
+ PreviewOptions
+
+ 0 %
+ (0/3)
+
+
+
+
+
+ apps/server/src/shared/infra/preview-generator/interface/preview.ts
+
+ interface
+ PreviewResponseMessage
+
+ 0 %
+ (0/3)
+
+
+
+
+
+ apps/server/src/shared/infra/preview-generator/loggable/preview-actions.loggable.ts
+
+ class
+ PreviewActionsLoggable
+
+ 0 %
+ (0/3)
+
+
+
+
+
+ apps/server/src/shared/infra/preview-generator/preview-generator.builder.ts
+
+ class
+ PreviewGeneratorBuilder
+
+ 0 %
+ (0/2)
+
+
+
+
+
+ apps/server/src/shared/infra/preview-generator/preview-generator.consumer.ts
+
+ injectable
+ PreviewGeneratorConsumer
+
+ 0 %
+ (0/3)
+
+
+
+
+
+ apps/server/src/shared/infra/preview-generator/preview-generator.service.ts
+
+ injectable
+ PreviewGeneratorService
+
+ 0 %
+ (0/6)
+
+
+
+
+
+ apps/server/src/shared/infra/preview-generator/preview.producer.ts
+
+ injectable
+ PreviewProducer
+
+ 0 %
+ (0/6)
+
+
+
+
+
+ apps/server/src/shared/infra/rabbitmq/error.mapper.ts
+
+ class
+ ErrorMapper
+
+ 0 %
+ (0/2)
+
+
+
+
+
+ apps/server/src/shared/infra/rabbitmq/exchange/files-preview.ts
+
+ variable
+ FilesPreviewExchange
+
+ 0 %
+ (0/1)
+
+
@@ -15583,6 +15775,18 @@
(1/1)
+
+
+
+ apps/server/src/shared/infra/rabbitmq/rpc-message-producer.ts
+
+ class
+ RpcMessageProducer
+
+ 0 %
+ (0/5)
+
+
@@ -15664,7 +15868,7 @@
File
0 %
- (0/4)
+ (0/3)
diff --git a/entities/FileRecord.html b/entities/FileRecord.html
index c30c682d630..537fc36ac95 100644
--- a/entities/FileRecord.html
+++ b/entities/FileRecord.html
@@ -181,7 +181,7 @@
-
+
@@ -218,7 +218,7 @@
-
+
@@ -255,7 +255,7 @@
-
+
@@ -291,7 +291,7 @@
-
+
@@ -329,7 +329,7 @@
-
+
@@ -365,7 +365,7 @@
-
+
@@ -401,7 +401,7 @@
-
+
@@ -438,7 +438,7 @@
-
+
@@ -474,7 +474,7 @@
-
+
@@ -510,7 +510,7 @@
-
+
@@ -526,6 +526,7 @@
import { ObjectId } from '@mikro-orm/mongodb';
import { BadRequestException } from '@nestjs/common';
import { BaseEntityWithTimestamps, EntityId } from '@shared/domain';
+import path from 'path';
import { v4 as uuid } from 'uuid';
import { ErrorType } from '../error';
import { PreviewInputMimeTypes } from '../interface/preview-input-mime-types.enum';
@@ -817,6 +818,12 @@
return PreviewStatus.PREVIEW_NOT_POSSIBLE_SCAN_STATUS_ERROR;
}
+
+ public get fileNameWithoutExtension(): string {
+ const filenameObj = path.parse(this.name);
+
+ return filenameObj.name;
+ }
}