fps-import: do not catch FileTooLargeError

pull/211/head
undefined 3 years ago
parent 98c23bb2cc
commit 1a4fcd6433

@ -110,6 +110,7 @@ class FpsProblemImportHandler extends Handler {
const result = await xml2js.parseStringPromise(content); const result = await xml2js.parseStringPromise(content);
tasks.push(result); tasks.push(result);
} catch (e) { } catch (e) {
if (e instanceof FileTooLargeError) throw e;
console.log(e); console.log(e);
const zip = new AdmZip(this.request.files.file.path); const zip = new AdmZip(this.request.files.file.path);
for (const entry of zip.getEntries()) { for (const entry of zip.getEntries()) {

@ -1,6 +1,6 @@
{ {
"name": "@hydrooj/fps-importer", "name": "@hydrooj/fps-importer",
"version": "1.3.0", "version": "1.3.1",
"description": "Import FPS problems", "description": "Import FPS problems",
"main": "package.json", "main": "package.json",
"repository": "https://github.com/hydro-dev/Hydro.git", "repository": "https://github.com/hydro-dev/Hydro.git",

Loading…
Cancel
Save