diff --git a/studio/frontend/src/features/studio/sections/dataset-section.tsx b/studio/frontend/src/features/studio/sections/dataset-section.tsx index 154999ac5b..b81dd058f6 100644 --- a/studio/frontend/src/features/studio/sections/dataset-section.tsx +++ b/studio/frontend/src/features/studio/sections/dataset-section.tsx @@ -357,6 +357,14 @@ export function DatasetSection() { event.target.value = ""; if (!file) return; + const MAX_SIZE_BYTES = 512 * 1024 * 1024; + if (file.size > MAX_SIZE_BYTES) { + toast.error("File too large", { + description: "Maximum upload size is 512 MB.", + }); + return; + } + setIsUploading(true); try { const contentBase64 = await fileToBase64Payload(file);