NextJS Upload to Google Cloud Using Signed URL

  Рет қаралды 2,691

ScriptBytes

ScriptBytes

Күн бұрын

Learn how to upload files to Google Cloud Storage in NextJS using a Signed URL. Signed URL's are a great option for granting temporary permission to users, or for uploading larger files.
In this demo I get the Signed URL using a server action.
I also cover how to create the service account and add the JSON Key to the project, as well as how to configure the CORS setting on your Google Cloud Storage bucket.
Google Cloud docs on uploading using Signed URLs:
cloud.google.c...
Google Cloud docs on setting up CORS config:
cloud.google.c...
Github link for code from video:
github.com/Scr...
Follow me on social media!
Instagram: / scriptbytes
Threads: www.threads.ne...
Check out my blog!
scriptbytes.io/

Пікірлер: 12
@florisalexandrou1095
@florisalexandrou1095 5 ай бұрын
I tried to do it with the same approach using supabase and was getting a react hydration error, I actually needed to add the 'use server' directive. Uploading with signed URLs is honestly underrated, couldn't find any official docs to show how to do it in NextJS. Thanks for saving me hours of headaches :D!
@scriptbytes
@scriptbytes 5 ай бұрын
I’m glad I could help!
@ehtz8019
@ehtz8019 2 ай бұрын
Hi could you please share the code for that :) @florisalexandrou1095
@alir8zana635
@alir8zana635 7 ай бұрын
your channel is really great I was looking for several videos and your channel came up keep up the great work the community appreciates your work greatly
@scriptbytes
@scriptbytes 7 ай бұрын
This is one of the nicest comments I think I’ve ever got. I appreciate it. Thank you.
@bdthombre
@bdthombre 6 ай бұрын
It's really nice channel..keep doing the great work...someday soon it will burst open the subscribers flow...
@scriptbytes
@scriptbytes 6 ай бұрын
Thanks, I hope so too!
@BleedingDev
@BleedingDev 5 ай бұрын
Awesome, I was looking for this, thank you very much!
@scriptbytes
@scriptbytes 4 ай бұрын
Glad I could help!
@SEV-sm3wg
@SEV-sm3wg 7 ай бұрын
Thanks for the amazing content! In your opinion, if I'm building a social media website with users who are uploading images and photos, is my understanding correct that I should use the Signed URL way instead of the way listed in your other NextJS Google Cloud video because my users will ordinarily NOT HAVE permission to write to the bucket?
@scriptbytes
@scriptbytes 7 ай бұрын
Each way has pros and cons. Signed URL reduces stress on your server, however it turns it into a 2-step process. 1. Info is submitted, url is returned, 2. image is uploaded. The extra step allows for a failure. Server action allows you to do it all in one step/transaction, but requires more server resources. Also makes you have to increase the server action size limit. Another option is instead of a server action, make an api endpoint to accept media and any other info (tweet/comment for example). This would still take server resources like the server action, but with out the size limitations. So basically...it depends :)
NextJS Upload to Google Cloud Storage
9:38
ScriptBytes
Рет қаралды 5 М.
Blazor Blog Data Structures | Build a Blog - Ep 05
15:52
ScriptBytes
Рет қаралды 314
КОГДА К БАТЕ ПРИШЕЛ ДРУГ😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 7 МЛН
REAL MAN 🤣💪🏻
00:35
Kan Andrey
Рет қаралды 42 МЛН
Elza love to eat chiken🍗⚡ #dog #pets
00:17
ElzaDog
Рет қаралды 24 МЛН
Getting Started With Google BigQuery API In Python
7:25
Jie Jenn
Рет қаралды 42 М.
Run your Next.js app on Cloud Run
12:23
Google Cloud Tech
Рет қаралды 8 М.
How to deploy a dockerized FastAPI to Cloud Run
22:22
COMMAND
Рет қаралды 3,8 М.
Google cloud storage c# windows application| @satyashrm711
14:28
satya sharma
Рет қаралды 2 М.
Run your React app on Google Cloud
16:28
Google Cloud Tech
Рет қаралды 21 М.
This is How I Scrape 99% of Sites
18:27
John Watson Rooney
Рет қаралды 160 М.
How to upload anything on cloudinary | ONLY video you need to watch
36:52
Deploy to Cloud Run using Cloud Build and Artifact Registry
9:32
ScriptBytes
Рет қаралды 3,1 М.