Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3313859113
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const folder = folderByType(dto.type); | ||
|
|
||
| const key = `chat/${chatRoomId}/${folder}/${meUserId}/${Date.now()}_${randomUUID()}_${safeName}`; | ||
| const key = `chat/${chatRoomId}/${folder}/${meUserId}/${Date.now()}_${randomUUID()}_${safeBaseName}.${finalExt}`; |
There was a problem hiding this comment.
Cap derived extension length before composing object key
The new key format appends finalExt directly from the client-provided filename extension, but unlike the basename it is never length-limited; a request like fileName="a." + "x"*1500 now produces a key well beyond S3's 1024-byte object-key limit, so presign succeeds but the subsequent upload fails in production for that input class. Before this change, sanitizeFileName truncated the full filename to 120 chars, so this regression was introduced here.
Useful? React with 👍 / 👎.
이슈 번호
close # 00
주요 변경사항
테스트 결과 (스크린샷)
참고 및 개선사항