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
*/
@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;
ext: string | null;
}> {

View file

@ -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) {

View file

@ -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');