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