tambahannya

This commit is contained in:
bipproduction
2025-02-19 17:41:56 +08:00
parent 0d4a8329d7
commit 9bde6a2a06
74 changed files with 1079 additions and 186 deletions

View File

@@ -0,0 +1,20 @@
import fs from "fs/promises";
import path from "path";
async function imgDel({
name,
UPLOAD_DIR_IMAGE,
}: {
name: string;
UPLOAD_DIR_IMAGE: string;
}) {
try {
await fs.unlink(path.join(UPLOAD_DIR_IMAGE, name));
return "ok";
} catch (error) {
console.log(error);
return "error";
}
}
export default imgDel;