Skip to content

Commit

Permalink
Add 500 MB limit for opening snapshots. Closes #671.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBurgess committed Jan 14, 2025
1 parent 85fd333 commit 154e495
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ui/dashboard/src/components/SplitSnapshotButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@ const useOpenSnapshot = () => {
});
}
};

// Max 500 MB size
if (!files[0] || files[0].size > 500 * 1000 * 1000) {
dispatch({
type: DashboardActions.WORKSPACE_ERROR,
error: "Snapshot exceeds the maximum supported size of 500 MB.",
});
return;
}

fr.readAsText(files[0]);
};
};
Expand Down

0 comments on commit 154e495

Please sign in to comment.