We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ddf3d15 commit 6edccedCopy full SHA for 6edcced
1 file changed
src/lib/nodes/image/upload.ts
@@ -94,6 +94,14 @@ const upload = new Command("upload")
94
const fileInfo = await Deno.stat(filePath);
95
const fileSize = fileInfo.size;
96
97
+ // Check file size limit (128 GiB)
98
+ const maxFileSize = 128 * 1024 * 1024 * 1024; // 128 GiB in bytes
99
+ if (fileSize > maxFileSize) {
100
+ throw new Error(
101
+ `File size exceeds maximum allowed size of 128 GiB. File size: ${(fileSize / (1024 * 1024 * 1024)).toFixed(2)} GiB`,
102
+ );
103
+ }
104
+
105
// Calculate parts for progress tracking
106
const minChunk = 5 * 1024 * 1024; // 5 MiB (minimum)
107
const defaultChunk = 64 * 1024 * 1024; // 64 MiB
0 commit comments