From 860cc5e41ccb50bd62f8b54815b2f5eb36c2c63b Mon Sep 17 00:00:00 2001 From: ernstmul Date: Mon, 20 Jan 2025 13:53:27 +0100 Subject: [PATCH 1/3] Show only the size limit for the bucket --- .../bucket-[bucket]/create-file/step1.svelte | 35 ++++++++----------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte index bdce4159b..90a49a46e 100644 --- a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte +++ b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte @@ -1,43 +1,37 @@ File Upload a file to add it to your bucket. - {#if isCloud} - {@const size = humanFileSize(sizeToBytes(service, 'MB', 1000))} - {@const plan = tierToPlan($organization?.billingPlan)} + {#if isCloud && fileError === 'File size exceeds the limit'} + {@const size = humanFileSize($bucket.maximumFileSize ?? sizeToBytes(service, 'MB', 1000))}

- The {plan.name} plan has a maximum upload file size limit of {Math.floor( - parseInt(size.value) - )}{size.unit}. - {#if $organization?.billingPlan === BillingPlan.FREE} - Upgrade to allow files of a larger size. - {/if} + The maximum file upload size for this bucket is {parseInt(size.value)}{size.unit}. + Edit this number in your + bucket settings.

- - {#if $organization?.billingPlan === BillingPlan.FREE} -
- -
- {/if} -
{/if} @@ -47,6 +41,7 @@ required bind:files={$createFile.files} allowedFileExtensions={$bucket.allowedFileExtensions} + bind:error={fileError} maxSize={isCloud ? $bucket.maximumFileSize : ($bucket.maximumFileSize ?? sizeToBytes(service, 'MB', 1000))} /> From d898d916a27050289bbc8443528ded2a654b80b7 Mon Sep 17 00:00:00 2001 From: ernstmul Date: Tue, 21 Jan 2025 10:14:40 +0100 Subject: [PATCH 2/3] new copy --- .../storage/bucket-[bucket]/create-file/step1.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte index 90a49a46e..f0e5a595f 100644 --- a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte +++ b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte @@ -26,7 +26,7 @@

The maximum file upload size for this bucket is {parseInt(size.value)}{size.unit}. - Edit this number in your + You can adjust it in your  bucket settings Date: Tue, 21 Jan 2025 10:18:00 +0100 Subject: [PATCH 3/3] new copy --- .../storage/bucket-[bucket]/create-file/step1.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte index f0e5a595f..43454a461 100644 --- a/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte +++ b/src/routes/(console)/project-[project]/storage/bucket-[bucket]/create-file/step1.svelte @@ -26,7 +26,7 @@

The maximum file upload size for this bucket is {parseInt(size.value)}{size.unit}. - You can adjust it in your  + You can adjust it in your bucket settings