mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 08:06:56 +00:00
DB에 청크 업로드 경로를 저장하도록 변경
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import { unlink } from "fs/promises";
|
||||
import env from "$lib/server/loadenv";
|
||||
import { rm, unlink } from "fs/promises";
|
||||
|
||||
export const getChunkDirectoryPath = (sessionId: string) => `${env.uploadsPath}/${sessionId}`;
|
||||
export const safeRecursiveRm = async (path: string | null | undefined) => {
|
||||
if (path) {
|
||||
await rm(path, { recursive: true }).catch(console.error);
|
||||
}
|
||||
};
|
||||
|
||||
export const safeUnlink = async (path: string | null | undefined) => {
|
||||
if (path) {
|
||||
|
||||
Reference in New Issue
Block a user