NextJS Upload to Google Cloud Storage

Поділитися
Вставка
  • Опубліковано 8 вер 2024
  • 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/Scr...
    How to set up Application Default Credentials:
    cloud.google.c...
    NextJS Server Action size limit:
    nextjs.org/doc...

КОМЕНТАРІ • 16

  • @saharilarshad1628
    @saharilarshad1628 6 місяців тому

    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  6 місяців тому +1

      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 6 місяців тому

      Thanks.. its work.. waiting for next video..

  • @nofx4u
    @nofx4u 3 дні тому

    you greatly helped me with my project too. Thank you so much for spending the time to make this content. I owe you.

  • @marcosdayanmann3575
    @marcosdayanmann3575 2 місяці тому

    Thank you so much! Helped me a lot. Your videos are amazing

  • @RakeshYadav-sp4tp
    @RakeshYadav-sp4tp 4 місяці тому

    Thanks... keep uploading new videos

  • @HarshitBhutani-u1u
    @HarshitBhutani-u1u 2 місяці тому

    nice explanation!

  • @HarshitBhutani-u1u
    @HarshitBhutani-u1u 2 місяці тому

    worked for me!

  • @soorajkj1564
    @soorajkj1564 27 днів тому

    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  26 днів тому

      You probably want to look into using Put SignedUrls. I’ve used those for large file uploads before and they work well

  • @datasciencetoday7127
    @datasciencetoday7127 5 місяців тому

    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  5 місяців тому

      What else would you like to know for it to be deployed?

    • @C3drix
      @C3drix 5 місяців тому +2

      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 5 місяців тому

      for the great value you are getting why be so rude ?