mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-09 11:08:48 +00:00
added endpoint to get postIds from user
This commit is contained in:
parent
ece95c7130
commit
78a40c35cb
4 changed files with 93 additions and 19 deletions
|
@ -26,7 +26,13 @@ export const upload = (req: Request, res: Response, next: NextFunction) => {
|
|||
}
|
||||
|
||||
const files = req.files as Express.Multer.File[];
|
||||
|
||||
if (files.length > 15) {
|
||||
//check if user uploaded more than 15 files
|
||||
return res.status(StatusCodes.BAD_REQUEST).json({
|
||||
error: "Too many files",
|
||||
details: [{ message: "You can upload a maximum of 15 files" }],
|
||||
});
|
||||
}
|
||||
for (const file of files) {
|
||||
//check for correct filetypes
|
||||
if (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue