mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 08:06:56 +00:00
11 lines
311 B
TypeScript
11 lines
311 B
TypeScript
import { unlink } from "fs/promises";
|
|
import env from "$lib/server/loadenv";
|
|
|
|
export const getChunkDirectoryPath = (sessionId: string) => `${env.uploadsPath}/${sessionId}`;
|
|
|
|
export const safeUnlink = async (path: string | null | undefined) => {
|
|
if (path) {
|
|
await unlink(path).catch(console.error);
|
|
}
|
|
};
|