fix avatar serving

This commit is contained in:
hippoz 2023-08-08 23:34:27 +03:00
parent d4d34d8eb0
commit f4d499b5b8
Signed by: hippoz
GPG key ID: 56C4E02A85F2FBED

View file

@ -1,9 +1,9 @@
import express from "express";
import { attachmentUploadDirectory } from "../serverconfig";
import { attachmentUploadDirectory, avatarUploadDirectory } from "../serverconfig";
const router = express.Router();
router.use("/avatar", express.static("uploads/avatar"));
router.use("/avatar", express.static(avatarUploadDirectory));
router.get("/attachment/:id", (req, res) => {
res.download(req.params.id, req.params.id, {