Skip to content

Commit

Permalink
fix: bring the file size limit back down to safe levels
Browse files Browse the repository at this point in the history
250KB is too much and causes server crashes
  • Loading branch information
joanise committed Jan 24, 2025
1 parent 9e1eb3a commit 7f0a196
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/studio-web/src/app/upload/upload.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any[]>();

Expand Down

0 comments on commit 7f0a196

Please sign in to comment.