Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Limit file size and count

Edward Cui32a528782433
diff --git a/server/src/index.ts b/server/src/index.ts
index 1d8f545f2..fcea58214 100644
--- a/server/src/index.ts
+++ b/server/src/index.ts
@@ -105,7 +105,12 @@ server.register(cors, {
credentials: true,
});
-server.register(multipart);
+server.register(multipart, {
+ limits: {
+ fileSize: 100 * 1024 * 1024, // 100 MB max file size
+ files: 1, // only allow 1 file
+ }
+});
// Serve static files
server.register(fastifyStatic, {