Skip to content

Commit 79ca2bf

Browse files
committed
refac: 사진 크기 1MB 제한으로 변경
1 parent 4922134 commit 79ca2bf

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/features/event/ui/FileUpload.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const FileUpload = ({ value, onChange, setEventState, useDefaultImage, onValidat
3030
return (
3131
<div className="flex flex-col justify-start gap-1">
3232
<h1 className="font-bold text-black text-lg">배너 사진 첨부</h1>
33-
<h2 className="text-placeholderText text-xs md:text-sm">500kB 이하의 jpeg, png 파일만 등록할 수 있습니다.</h2>
33+
<h2 className="text-placeholderText text-xs md:text-sm">1MB 이하의 jpeg, png 파일만 등록할 수 있습니다.</h2>
3434
<div
3535
className={`flex flex-col items-center justify-center h-44 border border-dashed ${
3636
isDragging ? 'border-main bg-dropdown' : 'border-placeholderText bg-gray3'

src/shared/hooks/useImageUpload.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ const useImageUpload = ({
2525
}, [value, onSuccess, useDefaultImage, previewUrl]);
2626

2727
const validateFile = (file: File) => {
28-
if (file.size > 500 * 1024) {
29-
alert('파일 크기는 500KB를 초과할 수 없습니다.');
28+
if (file.size > 1000 * 1024) {
29+
alert('파일 크기는 1MB를 초과할 수 없습니다.');
3030
return false;
3131
}
3232
if (!['image/jpg', 'image/jpeg', 'image/png'].includes(file.type)) {

0 commit comments

Comments
 (0)