From adf357fedbe9822cfd04caf3fe313d6dcd8be762 Mon Sep 17 00:00:00 2001 From: cowboysj Date: Thu, 1 Aug 2024 01:00:12 +0900 Subject: [PATCH] =?UTF-8?q?[Feat]=20:=20=ED=8C=8C=EC=9D=BC=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=20UTF-8=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/mdt/backend/service/S3Service.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/mdt/backend/service/S3Service.java b/src/main/java/com/mdt/backend/service/S3Service.java index 220b63d..11d03f9 100644 --- a/src/main/java/com/mdt/backend/service/S3Service.java +++ b/src/main/java/com/mdt/backend/service/S3Service.java @@ -73,6 +73,10 @@ public String generatePresignedUrl(String filePath, boolean forDownload) { "attachment; filename=\"" + encodedFileName + "\""); } + // 파일이 UTF-8로 인코딩된 텍스트 파일임을 명시 + generatePresignedUrlRequest.addRequestParameter("response-content-type", "text/plain; charset=UTF-8"); + + return amazonS3.generatePresignedUrl(generatePresignedUrlRequest).toString(); } catch (AmazonS3Exception e) { if (e.getStatusCode() == 404) {