core: fix formidable types

This commit is contained in:
undefined committed 2022-05-12 00:32:35 +08:00
1 parent 67ec4cea0c
commit 1e286b069f
7 files changed
+21 -20

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ class ProblemImportHydroHandler extends Handler {
if (keepUser) this.checkPriv(PRIV.PRIV_EDIT_SYSTEM);
if (!this.request.files.file) throw new ValidationError('file');
const tmpdir = path.join(os.tmpdir(), 'hydro', `${Math.random()}.import`);
const zip = new AdmZip(this.request.files.file.path);
const zip = new AdmZip(this.request.files.file.filepath);
await new Promise((resolve, reject) => {
zip.extractAllToAsync(tmpdir, true, (err) => {
if (err) reject(err);