added failed array

This commit is contained in:
srgooglo 2022-06-06 18:42:35 +02:00
parent 8f1155a6d0
commit 9451d8a12f

View File

@ -87,6 +87,8 @@ export default class FilesController extends Controller {
"/upload": { "/upload": {
middlewares: ["withAuthentication"], middlewares: ["withAuthentication"],
fn: async (req, res) => { fn: async (req, res) => {
let failed = []
// check directories exist // check directories exist
if (!fs.existsSync(global.uploadCachePath)) { if (!fs.existsSync(global.uploadCachePath)) {
await fs.promises.mkdir(global.uploadCachePath, { recursive: true }) await fs.promises.mkdir(global.uploadCachePath, { recursive: true })