NextJS Upload to Google Cloud Storage

  Рет қаралды 4,588

ScriptBytes

7 ай бұрын

Learn how to use NextJS to Upload files to Google Cloud Storage! This video will show how to upload files to Google Cloud Storage using either a server action or an API route.
These are both great options for smaller sized files.
#googlecloud #programming #software
Github link with code:
github.com/ScriptBytes/NextJSDemo
How to set up Application Default Credentials:
cloud.google.com/docs/authentication/provide-credentials-adc
NextJS Server Action size limit:
nextjs.org/docs/app/api-reference/next-config-js/serverActions#bodysizelimit

Пікірлер: 17
@saharilarshad1628
@saharilarshad1628 7 ай бұрын
updated video.. super cool. but i do a test on production, its give the error [Error]: Expected signal to be an instanceof AbortSignal. Even i try on npm run start after build, got the same error. Do you have any solution on it?
@scriptbytes
@scriptbytes 7 ай бұрын
Very good catch, I did also get this when I ran it in a "production" docker container. The fix is to add this line into your next.config file: experimental: { serverMinification: false, }, For some reason, that serverMinification is an experimental feature and turned on by default (which is...odd). Here is where I found the solution after some searching: github.com/vercel/next.js/issues/55682
@saharilarshad1628
@saharilarshad1628 7 ай бұрын
Thanks.. its work.. waiting for next video..
@nofx4u
@nofx4u Ай бұрын
you greatly helped me with my project too. Thank you so much for spending the time to make this content. I owe you.
@soorajkj1564
@soorajkj1564 2 ай бұрын
Even if the file is too large it will work fine on your localhost but in production it will definitely break. I got this error on my production build and it’s still not fixed. Still trying to figure it out with api routes do you have any idea?
@scriptbytes
@scriptbytes 2 ай бұрын
You probably want to look into using Put SignedUrls. I’ve used those for large file uploads before and they work well
@marcosdayanmann3575
@marcosdayanmann3575 4 ай бұрын
Thank you so much! Helped me a lot. Your videos are amazing
@scriptbytes
@scriptbytes 3 ай бұрын
Happy to help!
@RakeshYadav-sp4tp
@RakeshYadav-sp4tp 6 ай бұрын
Thanks... keep uploading new videos
@HarshitBhutani-u1u
@HarshitBhutani-u1u 3 ай бұрын
worked for me!
@HarshitBhutani-u1u
@HarshitBhutani-u1u 3 ай бұрын
nice explanation!
@scriptbytes
@scriptbytes 3 ай бұрын
Thanks!
@AjaySingh-jz8qx
@AjaySingh-jz8qx Ай бұрын
Nice please do next js file upload with aws s3
@datasciencetoday7127
@datasciencetoday7127 7 ай бұрын
yeah that's a good example you showed us how to do it when we are using the app on our laptop. Because who needs to deploy any appilication right?
@scriptbytes
@scriptbytes 7 ай бұрын
What else would you like to know for it to be deployed?
@C3drix
@C3drix 7 ай бұрын
I don't fully understand your point. My application is published on Vercel, and I solely utilize GCP Storage for storage purposes. Thus, this setup can be implemented even if the application is not running on a laptops.
@alir8zana635
@alir8zana635 7 ай бұрын
for the great value you are getting why be so rude ?
Part 5. Roblox trend☠️
00:13
Kan Andrey
Рет қаралды 2,9 МЛН
pumpkins #shorts
00:39
Mr DegrEE
Рет қаралды 108 МЛН
Life hack 😂 Watermelon magic box! #shorts by Leisi Crazy
00:17
Leisi Crazy
Рет қаралды 79 МЛН
Synyptas 4 | Арамызда бір сатқын бар ! | 4 Bolim
17:24
Как удалить компромат с компьютера?
0:20
Лена Тропоцел
Рет қаралды 2,6 МЛН
Китайцы сделали самый ДЛИННЫЙ ноутбук: Это шутка
0:15
Собиратель новостей
Рет қаралды 1,7 МЛН
Давайте поцарапаем iPhone 16 Pro Max!
0:57
Wylsacom
Рет қаралды 4,1 МЛН
Whats the best laptop? 💻
0:38
Adhemz
Рет қаралды 10 МЛН