Merge branch 'fe/refactor/image-upload' into 'fe/develop'

Refactor: 폴더 업로드 임시 구현 (파일 업로드 api로 연결, 임시 문구 추가)

See merge request s11-s-project/S11P21S002!161
This commit is contained in:
정현조 2024-09-24 18:50:14 +09:00
commit e475e27a62
2 changed files with 4 additions and 4 deletions

View File

@ -47,11 +47,11 @@ export async function uploadImageFile(memberId: number, projectId: number, folde
export async function uploadImageFolder(memberId: number, projectId: number, files: File[]) {
const formData = new FormData();
files.forEach((file) => {
formData.append('folderZip', file);
formData.append('imageList', file);
});
return api
.post(`/projects/${projectId}/folders/${0}/images/zip`, formData, {
.post(`/projects/${projectId}/folders/${0}/images/file`, formData, {
params: { memberId },
})
.then(({ data }) => data);

View File

@ -57,7 +57,7 @@ export default function WorkspaceDropdownMenu({
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem onClick={handleOpenUploadFile}> </DropdownMenuItem>
<DropdownMenuItem onClick={handleOpenUploadFolder}> </DropdownMenuItem>
<DropdownMenuItem onClick={handleOpenUploadFolder}> ()</DropdownMenuItem>
<DropdownMenuItem onClick={handleOpenUploadZip}> </DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
@ -83,7 +83,7 @@ export default function WorkspaceDropdownMenu({
>
<DialogTrigger asChild></DialogTrigger>
<DialogContent className="max-w-2xl">
<DialogHeader title="폴더 업로드" />
<DialogHeader title="폴더 업로드 (임시)" />
<ImageUploadFolderForm
onClose={handleCloseUploadFolder}
projectId={projectId}