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

+2 -2
View File
@@ -119,9 +119,9 @@ class ImportQduojHandler extends Handler {
async post({ domainId }) {
if (!this.request.files.file) throw new ValidationError('file');
const stat = await fs.stat(this.request.files.file.path);
const stat = await fs.stat(this.request.files.file.filepath);
if (stat.size > 128 * 1024 * 1024) throw new ValidationError('file', 'File too large');
await this.fromFile(domainId, this.request.files.file.path);
await this.fromFile(domainId, this.request.files.file.filepath);
this.response.redirect = this.url('problem_main');
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/import-qduoj",
"version": "1.3.3",
"version": "1.3.4",
"description": "Import QDUOJ problem export",
"main": "package.json",
"repository": "https://github.com/hydro-dev/Hydro.git",