화면관리 삭제기능구현
This commit is contained in:
@@ -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}`;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user