Merge branch 'fe/refactor/image-upload' into 'fe/develop'
Refactor: 폴더 업로드 임시 구현 (파일 업로드 api로 연결, 임시 문구 추가) See merge request s11-s-project/S11P21S002!161
This commit is contained in:
commit
e475e27a62
@ -47,11 +47,11 @@ export async function uploadImageFile(memberId: number, projectId: number, folde
|
|||||||
export async function uploadImageFolder(memberId: number, projectId: number, files: File[]) {
|
export async function uploadImageFolder(memberId: number, projectId: number, files: File[]) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
files.forEach((file) => {
|
files.forEach((file) => {
|
||||||
formData.append('folderZip', file);
|
formData.append('imageList', file);
|
||||||
});
|
});
|
||||||
|
|
||||||
return api
|
return api
|
||||||
.post(`/projects/${projectId}/folders/${0}/images/zip`, formData, {
|
.post(`/projects/${projectId}/folders/${0}/images/file`, formData, {
|
||||||
params: { memberId },
|
params: { memberId },
|
||||||
})
|
})
|
||||||
.then(({ data }) => data);
|
.then(({ data }) => data);
|
||||||
|
@ -57,7 +57,7 @@ export default function WorkspaceDropdownMenu({
|
|||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
<DropdownMenuItem onClick={handleOpenUploadFile}>파일 업로드</DropdownMenuItem>
|
<DropdownMenuItem onClick={handleOpenUploadFile}>파일 업로드</DropdownMenuItem>
|
||||||
<DropdownMenuItem onClick={handleOpenUploadFolder}>폴더 업로드</DropdownMenuItem>
|
<DropdownMenuItem onClick={handleOpenUploadFolder}>폴더 업로드 (임시)</DropdownMenuItem>
|
||||||
<DropdownMenuItem onClick={handleOpenUploadZip}>폴더 압축파일 업로드</DropdownMenuItem>
|
<DropdownMenuItem onClick={handleOpenUploadZip}>폴더 압축파일 업로드</DropdownMenuItem>
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
@ -83,7 +83,7 @@ export default function WorkspaceDropdownMenu({
|
|||||||
>
|
>
|
||||||
<DialogTrigger asChild></DialogTrigger>
|
<DialogTrigger asChild></DialogTrigger>
|
||||||
<DialogContent className="max-w-2xl">
|
<DialogContent className="max-w-2xl">
|
||||||
<DialogHeader title="폴더 업로드" />
|
<DialogHeader title="폴더 업로드 (임시)" />
|
||||||
<ImageUploadFolderForm
|
<ImageUploadFolderForm
|
||||||
onClose={handleCloseUploadFolder}
|
onClose={handleCloseUploadFolder}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
|
Loading…
Reference in New Issue
Block a user