Skip to content

[#93] post 여러 가지 제한 걸기#94

Merged
jw0202058 merged 44 commits into
devfrom
feat/#93/post-limit
Jul 24, 2025
Merged

[#93] post 여러 가지 제한 걸기#94
jw0202058 merged 44 commits into
devfrom
feat/#93/post-limit

Conversation

@jw0202058

Copy link
Copy Markdown
Collaborator

❗ 연관 이슈

📌 내용

  • 사진 6장 제한
  • 용량 제한
  • 확장자 제한
  • 상품명, 상품 설명 글자수 제한

☑️ 체크 사항 & 논의 사항

  • 디자인 수정할 예정

@netlify

netlify Bot commented Jul 23, 2025

Copy link
Copy Markdown

Deploy Preview for repicka ready!

Name Link
🔨 Latest commit 0102abc
🔍 Latest deploy log https://app.netlify.com/projects/repicka/deploys/6881aa70eb4a940008dd0042
😎 Deploy Preview https://deploy-preview-94--repicka.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jw0202058 jw0202058 changed the title [FEAT] post 여러 가지 제한 걸기 [#93] post 여러 가지 제한 걸기 Jul 23, 2025
@jw0202058 jw0202058 requested a review from halionaz July 23, 2025 16:47
Comment thread src/features/post/components/InputField/index.tsx Outdated
Comment thread src/features/post/components/StepFunnel/Step5/index.tsx Outdated

const updatedFiles = [...fileStore, ...fileArray];
const validFiles = fileArray.filter(file => {
// TODO: alert 어떻게 띄워줄지 디자인 요청

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

인정 알럿창 필요함

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

알럿

<MultilineInputfield onChange={handleDesc} value={descStore} maxLength={descLimit} />
<div className={s.PhotoLimit}>
<div className={s.SelectPhotoContainer}>
<UploadFile onChange={handleImageUploaded} />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이거 UploadFile 까보면 파일 input에 accept?인가? 그런 속성 있을건데
거기에서 아예 확장자 제한을 해버릴 수도 있어요
그러면 탐색기에서 정해진 확장자 파일만 보여줌

근데 얘도 우회할 수 있어서 위 같은 validation 로직을 유지하긴 해야돼요
그치만 이것도 해두면 좀 더 깔끔할듯

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 굿 새롭게 알게 된 사실

Comment thread src/features/post/stores/Step5Store.ts Outdated
@jw0202058 jw0202058 requested a review from halionaz July 23, 2025 17:22
@jw0202058

Copy link
Copy Markdown
Collaborator Author

패치완뇨

@halionaz

Copy link
Copy Markdown
Member

선생님도 커밋에 git add . 섞여 들어가있는데요? 진짜 뭐지

@halionaz halionaz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

휼룽햬오

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;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아주 좋네요

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} />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

극한의 효율 추구형

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} />

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿.

@jw0202058 jw0202058 merged commit 3089d01 into dev Jul 24, 2025
4 checks passed
@jw0202058 jw0202058 deleted the feat/#93/post-limit branch July 24, 2025 03:38
@jw0202058

Copy link
Copy Markdown
Collaborator Author

선생님도 커밋에 git add . 섞여 들어가있는데요? 진짜 뭐지

느낌표를 두 개 쳤더니 그걸로 바꼈네 머지

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants