update finfo

This commit is contained in:
Rizky 2024-08-10 06:30:26 +07:00
parent 7816056529
commit 986ac4cb27
1 changed files with 2 additions and 2 deletions

View File

@ -21,9 +21,9 @@ export const _ = {
if (await file.exists()) { if (await file.exists()) {
const arr = (path.split("/").pop() || "").split("-"); const arr = (path.split("/").pop() || "").split("-");
const ext = arr.pop(); const ctype = mime.getType(path);
const ext = mime.getExtension(ctype || "");
const fname = arr.join("-") + "." + ext; const fname = arr.join("-") + "." + ext;
const ctype = mime.getType(fname);
res = new Response( res = new Response(
JSON.stringify({ JSON.stringify({