summaryrefslogtreecommitdiff
path: root/fileUtils.ts
diff options
context:
space:
mode:
authorgrothedev <grothedev@gmail.com>2025-12-28 21:41:07 -0500
committergrothedev <grothedev@gmail.com>2025-12-28 21:41:07 -0500
commitbd6c3a07a82ba11cf7b0423307229891675e7ed3 (patch)
treefce602bc4038f0f79e12f9fb296e3d220915da23 /fileUtils.ts
parentf978ad7db04ced4cbcf04a82bf6f0cc3f4ce66a3 (diff)
phase 1 complete i guessHEADmain
Diffstat (limited to 'fileUtils.ts')
-rw-r--r--fileUtils.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/fileUtils.ts b/fileUtils.ts
index 6360a95..ab74223 100644
--- a/fileUtils.ts
+++ b/fileUtils.ts
@@ -48,7 +48,7 @@ export async function listUploadedFiles() {
}
} catch (error) {
if (!(error instanceof Deno.errors.NotFound)) {
- logger.error("Error listing files", { error: String(error) });
+ logger.server("ERROR", "Error listing files", { error: String(error) });
}
}
@@ -71,16 +71,16 @@ export async function cleanupExpiredFiles() {
if (age > config.fileExpiration) {
await Deno.remove(filepath);
cleaned++;
- logger.info("Expired file removed", { filename: entry.name, age });
+ logger.cleanup("INFO", "Expired file removed", { filename: entry.name, ageMs: age });
}
}
}
} catch (error) {
- logger.error("Error during file cleanup", { error: String(error) });
+ logger.cleanup("ERROR", "Error during file cleanup", { error: String(error) });
}
if (cleaned > 0) {
- logger.info("File cleanup completed", { filesRemoved: cleaned });
+ logger.cleanup("INFO", "File cleanup completed", { filesRemoved: cleaned });
}
}
@@ -119,7 +119,6 @@ export function getMimeType(filename: string): string {
// Videos
"mp4": "video/mp4",
"webm": "video/webm",
- "ogg": "video/ogg",
"ogv": "video/ogg",
"avi": "video/x-msvideo",
"mov": "video/quicktime",