데이터 테이블 첨부파일 연계
This commit is contained in:
@@ -144,3 +144,29 @@ export const uploadFilesAndCreateData = async (files: FileList) => {
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 테이블 연결된 파일 조회
|
||||
*/
|
||||
export const getLinkedFiles = async (
|
||||
tableName: string,
|
||||
recordId: string,
|
||||
): Promise<{
|
||||
success: boolean;
|
||||
files: any[];
|
||||
totalCount: number;
|
||||
targetObjid: string;
|
||||
}> => {
|
||||
try {
|
||||
console.log("📎 연결된 파일 조회:", { tableName, recordId });
|
||||
|
||||
const response = await apiClient.get(`/files/linked/${tableName}/${recordId}`);
|
||||
|
||||
console.log("✅ 연결된 파일 조회 성공:", response.data);
|
||||
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error("연결된 파일 조회 오류:", error);
|
||||
throw new Error("연결된 파일 조회에 실패했습니다.");
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user