diff --git a/packages/backend/src/core/FileInfoService.ts b/packages/backend/src/core/FileInfoService.ts index fab2af658c..eb4a90cf55 100644 --- a/packages/backend/src/core/FileInfoService.ts +++ b/packages/backend/src/core/FileInfoService.ts @@ -344,7 +344,7 @@ export class FileInfoService { * Detect MIME Type and extension by stream and path for performance */ @bindThis - public async detectRequestType(_response: Response, path?: string, fileSavingPromise: Promise = Promise.resolve()): Promise<{ + public async detectResponseType(_response: Response, path?: string, fileSavingPromise: Promise = Promise.resolve()): Promise<{ mime: string; ext: string | null; }> { diff --git a/packages/backend/src/server/FileServerService.ts b/packages/backend/src/server/FileServerService.ts index c87041cabf..9cb8777b8d 100644 --- a/packages/backend/src/server/FileServerService.ts +++ b/packages/backend/src/server/FileServerService.ts @@ -111,7 +111,7 @@ export class FileServerService { const response = await this.downloadService.fetchUrl(file.uri); const fileSaving = this.downloadService.pipeRequestToFile(response, path); - const { mime, ext } = await this.fileInfoService.detectRequestType(response, path, fileSaving); + const { mime, ext } = await this.fileInfoService.detectResponseType(response, path, fileSaving); const convertFile = async () => { if (isThumbnail) { diff --git a/packages/backend/src/server/MediaProxyServerService.ts b/packages/backend/src/server/MediaProxyServerService.ts index 509ad661c4..d2118010eb 100644 --- a/packages/backend/src/server/MediaProxyServerService.ts +++ b/packages/backend/src/server/MediaProxyServerService.ts @@ -77,7 +77,7 @@ export class MediaProxyServerService { const response = await this.downloadService.fetchUrl(url); const fileSaving = this.downloadService.pipeRequestToFile(response, path); - const { mime, ext } = await this.fileInfoService.detectRequestType(response, path, fileSaving); + const { mime, ext } = await this.fileInfoService.detectResponseType(response, path, fileSaving); const isConvertibleImage = isMimeImage(mime, 'sharp-convertible-image'); const isAnimationConvertibleImage = isMimeImage(mime, 'sharp-animation-convertible-image');