From f7fc0b1a993293beedbec067e7b2a71d6bf608af Mon Sep 17 00:00:00 2001 From: harisato Date: Thu, 13 Jul 2023 11:18:36 +0700 Subject: [PATCH] fix(be): using originname when update chapter --- src/files/files.service.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/files/files.service.ts b/src/files/files.service.ts index b6de5325..5bdcce56 100644 --- a/src/files/files.service.ts +++ b/src/files/files.service.ts @@ -59,9 +59,7 @@ export class FilesService { } const s3SubFolder = this.configService.get('aws.s3SubFolder') || 'images'; - const keyName = `${s3SubFolder}/manga-${mangaId}/chapter-${chapterNumber}/thumbnail.${thumbnail.fileName - .split('.') - .pop()}`; + const keyName = `${s3SubFolder}/manga-${mangaId}/chapter-${chapterNumber}/${thumbnail.fileName}`; const filePath = thumbnail.fullPath; const result = await this.uploadToS3(keyName, filePath);