mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-07 19:32:34 +01:00
fix attachment
This commit is contained in:
parent
4d7ce61ce5
commit
1754557af4
1698
package-lock.json
generated
1698
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -31,7 +31,7 @@
|
||||
"file-type": "^16.5.0",
|
||||
"image-size": "^1.0.0",
|
||||
"lambert-db": "^1.2.3",
|
||||
"lambert-server": "^1.2.7",
|
||||
"lambert-server": "^1.2.8",
|
||||
"missing-native-js-functions": "^1.0.8",
|
||||
"multer": "^1.4.2",
|
||||
"node-fetch": "^2.6.1",
|
||||
|
@ -11,6 +11,7 @@ const router = Router();
|
||||
router.post("/:channel_id", multer.single("file"), async (req: Request, res: Response) => {
|
||||
if (req.headers.signature !== Config.get().security.requestSignature)
|
||||
throw new HTTPError("Invalid request signature");
|
||||
if (!req.file) return;
|
||||
|
||||
const { buffer, mimetype, size, originalname, fieldname } = req.file;
|
||||
const { channel_id } = req.params;
|
||||
|
Loading…
Reference in New Issue
Block a user