rename detectResponseType

This commit is contained in:
tamaina 2023-01-23 22:20:15 +00:00
parent 13b50028d8
commit 88b41f86a9
3 changed files with 3 additions and 3 deletions

View File

@ -344,7 +344,7 @@ export class FileInfoService {
* Detect MIME Type and extension by stream and path for performance * Detect MIME Type and extension by stream and path for performance
*/ */
@bindThis @bindThis
public async detectRequestType(_response: Response, path?: string, fileSavingPromise: Promise<any> = Promise.resolve()): Promise<{ public async detectResponseType(_response: Response, path?: string, fileSavingPromise: Promise<any> = Promise.resolve()): Promise<{
mime: string; mime: string;
ext: string | null; ext: string | null;
}> { }> {

View File

@ -111,7 +111,7 @@ export class FileServerService {
const response = await this.downloadService.fetchUrl(file.uri); const response = await this.downloadService.fetchUrl(file.uri);
const fileSaving = this.downloadService.pipeRequestToFile(response, path); 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 () => { const convertFile = async () => {
if (isThumbnail) { if (isThumbnail) {

View File

@ -77,7 +77,7 @@ export class MediaProxyServerService {
const response = await this.downloadService.fetchUrl(url); const response = await this.downloadService.fetchUrl(url);
const fileSaving = this.downloadService.pipeRequestToFile(response, path); 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 isConvertibleImage = isMimeImage(mime, 'sharp-convertible-image');
const isAnimationConvertibleImage = isMimeImage(mime, 'sharp-animation-convertible-image'); const isAnimationConvertibleImage = isMimeImage(mime, 'sharp-animation-convertible-image');