docs(storage/500gb): Update hostname for S3 and TUS (#37125)

docs(storage/500gb): Add note about direct storage hostname for large uploads with S3 and TUS
This commit is contained in:
Lenny authored and GitHub committed 2025-07-25 13:10:28 -04:00
1 parent 1a9c718cf9
commit 1809b1dfc3
2 files changed
+24 -6

No files matched your search

@@ -25,6 +25,14 @@ This is all the information you need to connect to Supabase Storage using any S3
<img alt="Storage S3 Access keys" src="/docs/img/storage/s3-credentials.png" width="100%" />
<Admonition type="note">
For optimal performance when uploading large files you should always use the direct storage hostname. This provides several performance enhancements that will greatly improve performance when uploading large files.
Instead of `https://project-id.supabase.co` use `https://project-id.storage.supabase.co`
</Admonition>
<Tabs
scrollable
size="small"
@@ -39,7 +47,7 @@ This is all the information you need to connect to Supabase Storage using any S3
const client = new S3Client({
forcePathStyle: true,
region: 'project_region',
endpoint: 'https://project_ref.supabase.co/storage/v1/s3',
endpoint: 'https://project_ref.storage.supabase.co/storage/v1/s3',
credentials: {
accessKeyId: 'your_access_key_id',
secretAccessKey: 'your_secret_access_key',
@@ -55,7 +63,7 @@ This is all the information you need to connect to Supabase Storage using any S3
[supabase]
aws_access_key_id = your_access_key_id
aws_secret_access_key = your_secret_access_key
endpoint_url = https://project_ref.supabase.co/storage/v1/s3
endpoint_url = https://project_ref.storage.supabase.co/storage/v1/s3
region = project_region
```
</TabPanel>
@@ -86,7 +94,7 @@ const {
const client = new S3Client({
forcePathStyle: true,
region: 'project_region',
endpoint: 'https://project_ref.supabase.co/storage/v1/s3',
endpoint: 'https://project_ref.storage.supabase.co/storage/v1/s3',
credentials: {
accessKeyId: 'project_ref',
secretAccessKey: 'anonKey',
@@ -14,6 +14,14 @@ The resumable upload method is recommended when:
Supabase Storage implements the [TUS protocol](https://tus.io/) to enable resumable uploads. TUS stands for The Upload Server and is an open protocol for supporting resumable uploads. The protocol allows the upload process to be resumed from where it left off in case of interruptions. This method can be implemented using the [`tus-js-client`](https://github.com/tus/tus-js-client) library, or other client-side libraries like [Uppy](https://uppy.io/docs/tus/) that support the TUS protocol.
<Admonition type="note">
For optimal performance when uploading large files you should always use the direct storage hostname. This provides several performance enhancements that will greatly improve performance when uploading large files.
Instead of `https://project-id.supabase.co` use `https://project-id.storage.supabase.co`
</Admonition>
<Tabs
scrollable
size="small"
@@ -35,7 +43,8 @@ Supabase Storage implements the [TUS protocol](https://tus.io/) to enable resuma
return new Promise((resolve, reject) => {
var upload = new tus.Upload(file, {
endpoint: `https://${projectId}.supabase.co/storage/v1/upload/resumable`,
// Supabase TUS endpoint (with direct storage hostname)
endpoint: `https://${projectId}.storage.supabase.co/storage/v1/upload/resumable`,
retryDelays: [0, 3000, 5000, 10000, 20000],
headers: {
authorization: `Bearer ${session.access_token}`,
@@ -125,7 +134,7 @@ Supabase Storage implements the [TUS protocol](https://tus.io/) to enable resuma
// Initialize Uppy instance only once
const [uppy] = useState(() => new Uppy());
// Initialize Supabase client with project URL and anon key
const supabase = createClient(projectURL, anonKey);
const supabase = createClient(`https://${projectId}.supabase.co`, anonKey);
useEffect(() => {
const initializeUppy = async () => {
@@ -135,7 +144,8 @@ Supabase Storage implements the [TUS protocol](https://tus.io/) to enable resuma
} = await supabase.auth.getSession();
uppy.use(Tus, {
endpoint: `${projectURL}/storage/v1/upload/resumable`, // Supabase TUS endpoint
// Supabase TUS endpoint (with direct storage hostname)
endpoint: `https://${projectId}.storage.supabase.co/storage/v1/upload/resumable`,
retryDelays: [0, 3000, 5000, 10000, 20000], // Retry delays for resumable uploads
headers: {
authorization: `Bearer ${session?.access_token}`, // User session access token