Move to a cental upload api
This commit is contained in:
parent
1d620e3ec0
commit
a44ca7d8af
@ -1,8 +1,8 @@
|
||||
import { StatusCodes } from "http-status-codes";
|
||||
import multer from "multer";
|
||||
import nextConnect from "next-connect";
|
||||
import { createFile } from "../../../utils/helpers/fileHelpers";
|
||||
import { getUserByUploadKey } from "../../../utils/helpers/userHelpers";
|
||||
import { createFile } from "../../utils/helpers/fileHelpers";
|
||||
import { getUserByUploadKey } from "../../utils/helpers/userHelpers";
|
||||
|
||||
const apiRoute = nextConnect({
|
||||
onError(error, req, res) {
|
||||
@ -23,7 +23,7 @@ apiRoute.use(
|
||||
limits: {
|
||||
fileSize: process.env.MAX_FILE_SIZE,
|
||||
},
|
||||
}).single("sharex")
|
||||
}).single("file")
|
||||
);
|
||||
|
||||
apiRoute.post(async (req, res) => {
|
Reference in New Issue
Block a user