[#93] post 여러 가지 제한 걸기#94
Merged
Merged
Conversation
✅ Deploy Preview for repicka ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
halionaz
reviewed
Jul 23, 2025
|
|
||
| const updatedFiles = [...fileStore, ...fileArray]; | ||
| const validFiles = fileArray.filter(file => { | ||
| // TODO: alert 어떻게 띄워줄지 디자인 요청 |
| <MultilineInputfield onChange={handleDesc} value={descStore} maxLength={descLimit} /> | ||
| <div className={s.PhotoLimit}> | ||
| <div className={s.SelectPhotoContainer}> | ||
| <UploadFile onChange={handleImageUploaded} /> |
Member
There was a problem hiding this comment.
이거 UploadFile 까보면 파일 input에 accept?인가? 그런 속성 있을건데
거기에서 아예 확장자 제한을 해버릴 수도 있어요
그러면 탐색기에서 정해진 확장자 파일만 보여줌
근데 얘도 우회할 수 있어서 위 같은 validation 로직을 유지하긴 해야돼요
그치만 이것도 해두면 좀 더 깔끔할듯
…b/repicka-web into feat/#93/post-limit
Collaborator
Author
|
패치완뇨 |
Member
|
선생님도 커밋에 |
halionaz
approved these changes
Jul 24, 2025
Comment on lines
+1
to
+8
| export const MAX_PRICE = 999999; | ||
| export const MAX_LOCATION = 100; | ||
| export const MAX_TITLE = 64; | ||
| export const MAX_DESC = 1000; | ||
| export const ALLOWED_EXTENSIONS = ['jpg', 'jpeg', 'png', 'webp']; | ||
| export const MAX_SIZE_MB = 5; | ||
| export const MAX_SIZE_BYTES = MAX_SIZE_MB * 1024 * 1024; | ||
| export const MAX_FILE_LENGTH = 6; |
| return ( | ||
| <label className={s.SelectedPhotoBtn}> | ||
| <input type="file" accept="image/*" multiple onChange={onChange} className={s.Input} /> | ||
| <input type="file" accept=".png,.jpg,.jpeg,.webp" multiple onChange={onChange} className={s.Input} /> |
Member
There was a problem hiding this comment.
극한의 효율 추구형
Suggested change
| <input type="file" accept=".png,.jpg,.jpeg,.webp" multiple onChange={onChange} className={s.Input} /> | |
| <input type="file" accept={ALLOWED_EXTENSIONS.map(val => '.' + val ).join()} multiple onChange={onChange} className={s.Input} /> |
Collaborator
Author
느낌표를 두 개 쳤더니 그걸로 바꼈네 머지 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
❗ 연관 이슈
📌 내용
☑️ 체크 사항 & 논의 사항