x
This commit is contained in:
1 parent
406cad801b
commit
a2da091b15
21 files changed
+2454
-63
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user