Skip to content

Commit

Permalink
[Feat] : 파일 조회 UTF-8 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
cowboysj committed Jul 31, 2024
1 parent bfc8adb commit adf357f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/mdt/backend/service/S3Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit adf357f

Please sign in to comment.