Skip to content

Commit

Permalink
2장 이상 업로드할 때 맨앞 2개만 선택하더라도 게시글에서는 업로드할 때 선택한 사진 수만큼 나옴 (SWYP-team-2th…
Browse files Browse the repository at this point in the history
  • Loading branch information
YOOJS1205 committed Mar 2, 2025
1 parent 9280f18 commit c601700
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/vote-regist/VoteImages/ImageUploader/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useRef } from 'react';
import { MAX_IMAGE_COUNT } from '../../constants';
import useVoteRegist from '../../Provider/hooks';
import usePostUploadImage from '@/api/usePostUploadImage';

Expand Down Expand Up @@ -26,7 +27,7 @@ export default function useImageUploader() {
if (files.length === 0) return;

const formData = new FormData();
files.forEach((file) => {
files.slice(0, MAX_IMAGE_COUNT).forEach((file) => {
formData.append('files', file);
});

Expand Down

0 comments on commit c601700

Please sign in to comment.