You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/examples/supabase-storage-upload.mdx
+80-8Lines changed: 80 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,88 @@ import SupabaseDocsCards from "/snippets/supabase-docs-cards.mdx";
8
8
9
9
## Overview
10
10
11
-
This task downloads a video from a provided URL, saves it to a temporary file, and then uploads the video file to Supabase Storage using S3.
11
+
This example demonstrates how to upload a video file to Supabase Storage using two different methods.
12
12
13
-
## Key features
13
+
-[Upload to Supabase Storage using the Supabase client](/guides/examples/supabase-storage-upload#example-1-upload-to-supabase-storage-using-the-supabase-storage-client)
14
+
-[Upload to Supabase Storage using the AWS S3 client](/guides/examples/supabase-storage-upload#example-2-upload-to-supabase-storage-using-the-aws-s3-client)
14
15
15
-
- Fetches a video from a provided URL
16
-
- Uploads the video file to Supabase Storage
16
+
## Upload to Supabase Storage using the Supabase client
17
+
18
+
This task downloads a video from a provided URL, saves it to a temporary file, and then uploads the video file to Supabase Storage using the Supabase client.
logger.log(`Video uploaded to Supabase Storage bucket`, { objectKey });
61
+
62
+
// Return the video object key and bucket
63
+
return {
64
+
objectKey,
65
+
bucket: bucket,
66
+
};
67
+
},
68
+
});
69
+
```
70
+
71
+
### Testing your task
72
+
73
+
To test this task in the dashboard, you can use the following payload:
74
+
75
+
```json
76
+
{
77
+
"videoUrl": "<a-video-url>"// Replace <a-video-url> with the URL of the video you want to upload
78
+
}
79
+
```
80
+
81
+
## Upload to Supabase Storage using the AWS S3 client
82
+
83
+
This task downloads a video from a provided URL, saves it to a temporary file, and then uploads the video file to Supabase Storage using the AWS S3 client.
84
+
85
+
### Key features
86
+
87
+
- Fetches a video from a provided URL
88
+
- Uploads the video file to Supabase Storage using S3
0 commit comments