Temporarily disable image uploads.

This commit is contained in:
theADAMJR 2023-05-27 12:10:43 +01:00
parent ea92f90a36
commit 9dcd14b4f4

View File

@ -42,7 +42,10 @@ function setupMulter(app: Application) {
limits: { fileSize: 1024 * 1024 },
});
app.post('/v2/upload', updateUser, validateUser, extraRateLimit(10), upload.single('file'), async (req, res) => {
app.post('/v2/upload', updateUser, validateUser, extraRateLimit(10), async (req, res) => {
res.status(400).json({ message: "Image uploads are temporarily disabled." })
return;
const file = req.file!;
const buffer = await readFileAsync(file.path);