Skip to content

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

Register @fastify/multipart

Edward Cuif70447d0af55
diff --git a/server/package-lock.json b/server/package-lock.json
index e62ca8f00..4effafc1e 100644
--- a/server/package-lock.json
+++ b/server/package-lock.json
@@ -11,6 +11,7 @@
"@clickhouse/client": "1.11.1",
"@fast-csv/parse": "^5.0.2",
"@fastify/cors": "11.0.1",
+ "@fastify/multipart": "^9.0.3",
"@fastify/one-line-logger": "2.0.2",
"@fastify/rate-limit": "^10.3.0",
"@fastify/static": "8.1.1",
@@ -1150,6 +1151,12 @@
"fast-uri": "^3.0.0"
}
},
+ "node_modules/@fastify/busboy": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-3.1.1.tgz",
+ "integrity": "sha512-5DGmA8FTdB2XbDeEwc/5ZXBl6UbBAyBOOLlPuBnZ/N1SwdH9Ii+cOX3tBROlDgcTXxjOYnLMVoKk9+FXAw0CJw==",
+ "license": "MIT"
+ },
"node_modules/@fastify/cors": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/@fastify/cors/-/cors-11.0.1.tgz",
@@ -1170,6 +1177,22 @@
"toad-cache": "^3.7.0"
}
},
+ "node_modules/@fastify/deepmerge": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@fastify/deepmerge/-/deepmerge-2.0.2.tgz",
+ "integrity": "sha512-3wuLdX5iiiYeZWP6bQrjqhrcvBIf0NHbQH1Ur1WbHvoiuTYUEItgygea3zs8aHpiitn0lOB8gX20u1qO+FDm7Q==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fastify"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/fastify"
+ }
+ ],
+ "license": "MIT"
+ },
"node_modules/@fastify/error": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@fastify/error/-/error-4.1.0.tgz",
@@ -1230,6 +1253,45 @@
"dequal": "^2.0.3"
}
},
+ "node_modules/@fastify/multipart": {
+ "version": "9.0.3",
+ "resolved": "https://registry.npmjs.org/@fastify/multipart/-/multipart-9.0.3.tgz",
+ "integrity": "sha512-pJogxQCrT12/6I5Fh6jr3narwcymA0pv4B0jbC7c6Bl9wnrxomEUnV0d26w6gUls7gSXmhG8JGRMmHFIPsxt1g==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fastify"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/fastify"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "@fastify/busboy": "^3.0.0",
+ "@fastify/deepmerge": "^2.0.0",
+ "@fastify/error": "^4.0.0",
+ "fastify-plugin": "^5.0.0",
+ "secure-json-parse": "^3.0.0"
+ }
+ },
+ "node_modules/@fastify/multipart/node_modules/secure-json-parse": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-3.0.2.tgz",
+ "integrity": "sha512-H6nS2o8bWfpFEV6U38sOSjS7bTbdgbCGU9wEM6W14P5H0QOsz94KCusifV44GpHDTu2nqZbuDNhTzu+mjDSw1w==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fastify"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/fastify"
+ }
+ ],
+ "license": "BSD-3-Clause"
+ },
"node_modules/@fastify/one-line-logger": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/@fastify/one-line-logger/-/one-line-logger-2.0.2.tgz",
diff --git a/server/package.json b/server/package.json
index 81b63a15e..9a6444d4b 100644
--- a/server/package.json
+++ b/server/package.json
@@ -24,6 +24,7 @@
"@clickhouse/client": "1.11.1",
"@fast-csv/parse": "^5.0.2",
"@fastify/cors": "11.0.1",
+ "@fastify/multipart": "^9.0.3",
"@fastify/one-line-logger": "2.0.2",
"@fastify/rate-limit": "^10.3.0",
"@fastify/static": "8.1.1",
diff --git a/server/src/index.ts b/server/src/index.ts
index 2d475c7b8..c0ead0afc 100644
--- a/server/src/index.ts
+++ b/server/src/index.ts
@@ -1,5 +1,6 @@
import cors from "@fastify/cors";
import fastifyStatic from "@fastify/static";
+import multipart from "@fastify/multipart";
import { toNodeHandler } from "better-auth/node";
import Fastify from "fastify";
import { dirname, join } from "path";
@@ -98,6 +99,8 @@ server.register(cors, {
credentials: true,
});
+server.register(multipart);
+
// Serve static files
server.register(fastifyStatic, {
root: join(__dirname, "../public"),