From 7f0a19636afe74812db242bb8d24b54ecbee7883 Mon Sep 17 00:00:00 2001 From: Eric Joanis Date: Fri, 24 Jan 2025 15:38:33 -0500 Subject: [PATCH] fix: bring the file size limit back down to safe levels 250KB is too much and causes server crashes --- packages/studio-web/src/app/upload/upload.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/studio-web/src/app/upload/upload.component.ts b/packages/studio-web/src/app/upload/upload.component.ts index 9ec8c7b5..07fca8ce 100644 --- a/packages/studio-web/src/app/upload/upload.component.ts +++ b/packages/studio-web/src/app/upload/upload.component.ts @@ -59,8 +59,10 @@ export class UploadComponent implements OnDestroy, OnInit { contactLink = environment.packageJson.contact; progressMode: ProgressBarMode = "indeterminate"; progressValue = 0; - maxTxtSizeKB = 250; // Max 250 KB plain text file size - maxRasSizeKB = 250; // Max 250 KB .readalong XML text size + // Max plain text file size: 40KB is OK but takes around 15-20s on Heroku + maxTxtSizeKB = 40; + // Max .readalong XML text size: text * 5 is a rough heuristic; the XML is much bloated from the text. + maxRasSizeKB = 200; @ViewChild("textInputElement") textInputElement: ElementRef; @Output() stepChange = new EventEmitter();