Skip to content

Commit

Permalink
fix: update
Browse files Browse the repository at this point in the history
  • Loading branch information
wuwei committed Jun 27, 2024
1 parent e8ec713 commit 556cdf7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/upload/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import express from "express";
import multiparty from "multiparty";

const router = express.Router();
const uploadDir = "./src/server/static";
/**
* Uploads a file using the multiparty library.
*
Expand All @@ -12,8 +13,8 @@ const multipartyUpload = (req) => {
return new Promise(async (resolve, reject) => {
const form = new multiparty.Form({
maxFilesSize: 1024 * 1024 * 1024,
uploadDir,
});
form.uploadDir = "./src/server/static";
form.parse(req, (err, fields, files) => {
if (err) {
reject(err);
Expand Down

0 comments on commit 556cdf7

Please sign in to comment.