Skip to content

Commit 7f0a196

Browse files
committed
fix: bring the file size limit back down to safe levels
250KB is too much and causes server crashes
1 parent 9e1eb3a commit 7f0a196

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/studio-web/src/app/upload/upload.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ export class UploadComponent implements OnDestroy, OnInit {
5959
contactLink = environment.packageJson.contact;
6060
progressMode: ProgressBarMode = "indeterminate";
6161
progressValue = 0;
62-
maxTxtSizeKB = 250; // Max 250 KB plain text file size
63-
maxRasSizeKB = 250; // Max 250 KB .readalong XML text size
62+
// Max plain text file size: 40KB is OK but takes around 15-20s on Heroku
63+
maxTxtSizeKB = 40;
64+
// Max .readalong XML text size: text * 5 is a rough heuristic; the XML is much bloated from the text.
65+
maxRasSizeKB = 200;
6466
@ViewChild("textInputElement") textInputElement: ElementRef;
6567
@Output() stepChange = new EventEmitter<any[]>();
6668

0 commit comments

Comments
 (0)