화면관리 삭제기능구현

This commit is contained in:
kjs
2025-09-08 13:10:09 +09:00
parent 87ce1b74d4
commit 1eeda775ef
19 changed files with 2506 additions and 167 deletions

View File

@@ -170,3 +170,27 @@ export const getLinkedFiles = async (
throw new Error("연결된 파일 조회에 실패했습니다.");
}
};
/**
* 파일 미리보기 URL 생성
*/
export const getFilePreviewUrl = (fileId: string): string => {
const baseUrl = process.env.NEXT_PUBLIC_API_URL || "/api";
return `${baseUrl}/files/preview/${fileId}`;
};
/**
* 파일 다운로드 URL 생성
*/
export const getFileDownloadUrl = (fileId: string): string => {
const baseUrl = process.env.NEXT_PUBLIC_API_URL || "/api";
return `${baseUrl}/files/download/${fileId}`;
};
/**
* 직접 파일 경로 URL 생성 (정적 파일 서빙)
*/
export const getDirectFileUrl = (filePath: string): string => {
const baseUrl = process.env.NEXT_PUBLIC_API_URL?.replace("/api", "") || "";
return `${baseUrl}${filePath}`;
};