Skip to content

Commit

Permalink
Merge pull request #111 from Funssion-SWM/develop
Browse files Browse the repository at this point in the history
Fix: 이미지 제한 사이즈 10MB -> 5MB로 변경
  • Loading branch information
dongree authored May 28, 2024
2 parents f16f909 + 3514421 commit 504f6be
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 10 deletions.
5 changes: 1 addition & 4 deletions src/components/create/series/SeriesForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@ export default function SeriesForm({ userId }: Props) {
if (e.target.files !== null) {
const file = e.target.files[0];
if (file.size > MAX_IMAGE_BYTE) {
notifyToast(
'최대 썸네일 이미지 사이즈 10MB를 초과하였습니다.',
'error'
);
notifyToast('최대 썸네일 이미지 사이즈 5MB를 초과하였습니다.', 'error');
return;
}
const url = window.URL.createObjectURL(file);
Expand Down
2 changes: 1 addition & 1 deletion src/constants/limit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const SEARCH_RESULT_TIME = 500;

export const MAX_PROFILE_IMAGE_BYTE = 2097152;

export const MAX_IMAGE_BYTE = 10485760;
export const MAX_IMAGE_BYTE = 5242880;

export const MEMO_NUMBER_PER_PAGE_FOR_INFINITY_SCROLL = 20;
export const SERIES_NUMBER_PER_PAGE_FOR_INFINITY_SCROLL = 20;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/editor/plugins/upload-images.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function startImageUpload(

// check if the file size is less than 20MB
} else if (file.size > MAX_IMAGE_BYTE) {
notifyToast('최대 이미지 사이즈 10MB를 초과하였습니다.', 'error');
notifyToast('최대 이미지 사이즈 5MB를 초과하였습니다.', 'error');
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/service/answers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export async function postImageInAnswer(
)
.then((res) => {
if (res.status === 413) {
return { code: 413, message: '이미지 크기가 10MB를 초과하였습니다.' };
return { code: 413, message: '이미지 크기가 5MB를 초과하였습니다.' };
}
return res.json();
})
Expand Down
2 changes: 1 addition & 1 deletion src/service/coverletter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export async function postImageInCoverletter(
)
.then((res) => {
if (res.status === 413) {
return { code: 413, message: '이미지 크기가 10MB를 초과하였습니다.' };
return { code: 413, message: '이미지 크기가 5MB를 초과하였습니다.' };
}
return res.json();
})
Expand Down
2 changes: 1 addition & 1 deletion src/service/memos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export async function postImageInMemo(
)
.then((res) => {
if (res.status === 413) {
return { code: 413, message: '이미지 크기가 10MB를 초과하였습니다.' };
return { code: 413, message: '이미지 크기가 5MB를 초과하였습니다.' };
}
return res.json();
})
Expand Down
2 changes: 1 addition & 1 deletion src/service/questions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export async function postImageInQuestion(
)
.then((res) => {
if (res.status === 413) {
return { code: 413, message: '이미지 크기가 10MB를 초과하였습니다.' };
return { code: 413, message: '이미지 크기가 5MB를 초과하였습니다.' };
}
return res.json();
})
Expand Down

0 comments on commit 504f6be

Please sign in to comment.