This commit is contained in:
Your Name committed 2026-07-28 00:13:57 -04:00
1 parent 406cad801b
commit a2da091b15
21 files changed
+2454 -63

No files matched your search

+2 -2
View File
@@ -11,9 +11,9 @@ export const uploadRoute = new Elysia({ prefix: "/upload" })
return { error: "No file uploaded" };
}
// Validate file type
if (!file.type.startsWith("image/")) {
if (!file.type.startsWith("image/") && !file.type.startsWith("video/")) {
set.status = 400;
return { error: "Only image files are allowed" };
return { error: "Only image and video files are allowed" };
}
console.log(`[Upload] Processing: ${file.name} (${(file.size / 1024).toFixed(2)} KB, ${file.type})`);
// Generate unique filename