ScriptBytes
ScriptBytes
  • 48
  • 254 482
NextJS Upload to Google Cloud Using Signed URL
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.com/storage/docs/samples/storage-generate-upload-signed-url-v4
Google Cloud docs on setting up CORS config:
cloud.google.com/storage/docs/using-cors#command-line
Github link for code from video:
github.com/ScriptBytes/NextJSDemo/tree/upload-signedurl
Follow me on social media!
Instagram: scriptbytes
Threads: www.threads.net/@scriptbytes
Check out my blog!
scriptbytes.io/
Переглядів: 1 528

Відео

NextJS Upload to Google Cloud Storage
Переглядів 3,1 тис.5 місяців тому
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/authe...
Task WhenAll vs Parallel ForEach
Переглядів 4545 місяців тому
Learn the differences between Task WhenAll vs Parallel ForEach and when to choose the correct one for your .Net 8 applications. Choosing the right option could be critical for the performance of your applications. Task WhenAll is a great option for smaller batches of IO code that can all be done at one time. For example making 10 database queries at one time. Parallel ForEach is a good option f...
Memory Cache in Dotnet API
Переглядів 2345 місяців тому
Learn how to add a memory cache into a dotnet 8 api. Using a memory cache for frequently accessed data is a quick and easy way to both improve the performance of your API and reduce network traffic and database calls. Github branch with code from this video: github.com/ScriptBytes/DemoApi/tree/memory-cache Follow me on social media! Instagram: scriptbytes Threads: www.threads.net...
.Net 8 API Role Based Authorization
Переглядів 3,6 тис.5 місяців тому
Learn how to add role based authorization to your .Net 8 API using the IClaimsTransformation interface. This is a great way to protect your .Net API routes based on whether your user has specific roles. Microsoft docs for IClaimsTransformation: learn.microsoft.com/en-us/aspnet/core/security/authentication/claims?view=aspnetcore-8.0#extend-or-add-custom-claims-using-iclaimstransformation Github ...
Blazor 8 Docker | Build a Blog - Ep 04.5
Переглядів 1,4 тис.6 місяців тому
Learn how to run a Blazor 8 application in Docker. I show how to set up Docker and Docker Compose to run our combo server/client Blazor 8 application. Since my application is using TailwindCSS, I also show how to add the node step in the dockerfile to build and minify our tailwindcss files. Code from this episode can be found here: github.com/ScriptBytes/BlazorBlogSeries/tree/episode045-docker ...
Blazor Blog Data Structures | Build a Blog - Ep 05
Переглядів 2226 місяців тому
In this video I begin the process of designing our blog data structures in a way that will allow us to save the information to a database. I demo a couple ways of doing, including showing how Wordpress saves their data, how I'm doing using inheritance for each of the content block sections, and also using a json data column, which is how Notion saves their data. Code from this episode can be fo...
Blazor Server Code Syntax Highlighting with Highlight.js | Build a Blog - Ep 04
Переглядів 4106 місяців тому
In this video I show how to add code syntax highlighting to my Blazor server side blog using Highlight.js. Since our pages are rendered on the server, we have to take extra steps to ensure that our javascript is getting called correctly. To do this we have to utilize a Razor Class Library and a javascript library module from Microsofts documentation page. Highlight.js website: highlightjs.org/ ...
Blazor Render Fragments | Build a Blog - Ep 03
Переглядів 3116 місяців тому
In this episode of Build a Blog in Blazor, I show how Render Fragments work. Render fragments allow you to pass child content/html into your components that will be rendered inside your component. I show how to use the default ChildContent render fragment, as well as how to use multiple fragments and use them by name. Code from this episode can be found here: github.com/ScriptBytes/BlazorBlogSe...
Blog Layout and Design | Build a Blog - Ep 02
Переглядів 4987 місяців тому
In this episode of Build a Blog in Blazor I begin to set up the overall layout and design of our site using Tailwind CSS. I use my original wordpress blog as a starting point and replicate the general layout of it. My main focus is to set up the navbar and post layout while making sure it is responsive and looks good on both large and small size screens. Code from this video found here: github....
Add Tailwind CSS to Blazor! | Build a Blog - Ep 01
Переглядів 1,6 тис.7 місяців тому
In this video of the Build a Blog series, I set up our initial Blazor application and I show how to add Tailwind CSS to it. By default Blazor apps come with Bootstrap included, but I prefer to strip it out and use Tailwind. I show how to set up and configure Tailwind config file and how to use the Tailwind CLI along with npx to create the final css file. I also give some hints on how to run the...
Build a Blog in Blazor! Tutorial | Ep 00 - Introduction
Переглядів 5187 місяців тому
Welcome to my new series where we are going to build a blog in Blazor version 8. In this tutorial series I am going to show the entire process of building a full stack, server side rendered, SEO friendly blog using Blazor 8, .Net, and Postgres. I am going to start with a goal of creating a small, working Minimum Viable Product, or MVP. If you want to follow along, I will be pushing all of my co...
Entity Framework Web API Tutorial .Net 8
Переглядів 3,6 тис.7 місяців тому
In this video tutorial I will show how to use Entity Framework with a Web Api. I will go over the basics of how the Entity Framework ORM works with mapping entities to database tables using the Database Context, how it generates the SQL queries, how it tracks changes to entities that you query, and how it uses that information to determine how to edit records. Link to the Github Repo with all o...
Manually Deploy to Cloud Run - Updated for Artifact Registry
Переглядів 4,4 тис.8 місяців тому
In this video I show how to manually deploy a Docker image to Cloud Run using Artifact Registry. This is an updated video, I did one previously that used Container Registry, but Google has since suggested to use Artifact Registry. I show how to create the image repository in Artifact Registry, how to build the image, how to authenticate docker with Artifact Registry, tag the image, push the ima...
Deploy to Cloud Run using Cloud Build and Artifact Registry
Переглядів 2,3 тис.8 місяців тому
Learn how to use Google Cloud Build to deploy an application to Cloud Run using the Artifact Registry. I show how to set up the Cloud Run Service, the repository in Artifact Registry, and the trigger in Cloud Build using a cloudbuild.yaml file. Github Repo for code reference. As of right now it's in the dev branch: github.com/ScriptBytes/DemoApi/tree/dev Follow me on social media! Instagram: in...
How to add Blazor Hot Reload
Переглядів 2,4 тис.9 місяців тому
How to add Blazor Hot Reload
Call JavaScript From Blazor Web Assembly
Переглядів 9379 місяців тому
Call JavaScript From Blazor Web Assembly
How to Run MongoDB in Docker
Переглядів 16 тис.9 місяців тому
How to Run MongoDB in Docker
Google Cloud Scheduler for Beginners
Переглядів 2,5 тис.10 місяців тому
Google Cloud Scheduler for Beginners
Monitor API's with Uptime Checks in Google Cloud!
Переглядів 43310 місяців тому
Monitor API's with Uptime Checks in Google Cloud!
Basic Authentication in Dotnet API
Переглядів 4 тис.10 місяців тому
Basic Authentication in Dotnet API
Must Have API Controllers!
Переглядів 17810 місяців тому
Must Have API Controllers!
Upload and Download Files to Google Cloud Storage using .Net
Переглядів 6 тис.11 місяців тому
Upload and Download Files to Google Cloud Storage using .Net
Docker Compose for Beginners
Переглядів 886Рік тому
Docker Compose for Beginners
Import CSV to SQL Server using Azure Data Studio
Переглядів 17 тис.Рік тому
Import CSV to SQL Server using Azure Data Studio
The Essential Docker Commands You Need to Know
Переглядів 519Рік тому
The Essential Docker Commands You Need to Know
Thinkpad VS Macbook Pro - Battery Test
Переглядів 9 тис.Рік тому
Thinkpad VS Macbook Pro - Battery Test
Seeding Data with DotNet
Переглядів 2,3 тис.Рік тому
Seeding Data with DotNet
Google Cloud SQL with a Public IP | Tutorial
Переглядів 3,5 тис.Рік тому
Google Cloud SQL with a Public IP | Tutorial
Manually Deploy Docker Image to Google Cloud Run | Tutorial
Переглядів 26 тис.Рік тому
Manually Deploy Docker Image to Google Cloud Run | Tutorial

КОМЕНТАРІ

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

    How would you go about using authenticated user in a website environment to add permission to view a link within the google cloud when you are getting this message This XML file does not appear to have any style information associated with it. The document tree is shown below. <Error> <Code>AccessDenied</Code> <Message>Access denied.</Message> <Details>Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object. Permission 'storage.objects.get' denied on resource (or it may not exist).</Details> </Error>

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

      I think you mean how to allow users on your site to view objects stored in a private bucket? If so, you'll want to look into a GET SignedUrl in the GCS bucket.

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

      @@scriptbytes thank for the tip, it really helped with the problem, I have been struggling with for 2 days and now I can finish development of the system

  • @navinkumar6388
    @navinkumar6388 4 дні тому

    Thanks 👍 With Love from India 🇮🇳

  • @mikegreiling
    @mikegreiling 8 днів тому

    Thank you. Clear, concise and exactly the information I was looking for.

  • @srikalyanlingamaneni8089
    @srikalyanlingamaneni8089 9 днів тому

    nce video.I need to authenticate an api which has username and password.I will try this basic authentication.

  • @atakanozkan1598
    @atakanozkan1598 10 днів тому

    nice video

  • @renanvolkers
    @renanvolkers 10 днів тому

    Thanks for you Nice nice

  • @SupriyaDeshmukh-nl8si
    @SupriyaDeshmukh-nl8si 10 днів тому

    i dont have index.cshtml page. I just have app.razor

    • @scriptbytes
      @scriptbytes 9 днів тому

      My demo is using blazor WASM. I assume yours is a server side app? I haven't done this with a server app, but I think as long as you put the js link in whichever file has the <head> tag in it, I think it'll work.

  • @amnashahid9464
    @amnashahid9464 11 днів тому

    how to call sp in PostgreSQL that returns rows ?

    • @scriptbytes
      @scriptbytes 11 днів тому

      You would probably want to use FromSql<T>: learn.microsoft.com/en-us/ef/core/querying/sql-queries

    • @amnashahid9464
      @amnashahid9464 11 днів тому

      @@scriptbytes thanks for ur reply. Actually I did use it. But in postgresql, if ur sp returns rows it has to have a refcursor which will contain rows and when u call sp from c# u need to run call ur_sp(params, 'cur'); fetch all in "cur". So this command not working if we use ef

  • @miles6875
    @miles6875 14 днів тому

    Great presentation

  • @PilotGT
    @PilotGT 14 днів тому

    well done, thanks for posting

  • @tianyuyu9711
    @tianyuyu9711 17 днів тому

    I love u

  • @stevenvillarreal8970
    @stevenvillarreal8970 17 днів тому

    For people having issues with this not displaying any messages, type "@rendermode InteractiveServer" at the top of the page under the @inject line which allows events to start firing.

  • @saifumar3001
    @saifumar3001 19 днів тому

    Scripts @ 23:32 with -o and idempotent switch

  • @nestormartinez9259
    @nestormartinez9259 22 дні тому

    Great, by the way I watched that you can implement authorization through middlewares. Is this an old approach or it is more about your preferences ?

    • @scriptbytes
      @scriptbytes 21 день тому

      You can definitely use middleware. We use middleware to add roles/claims for authenticated users in our api's.

  • @jakubk7158
    @jakubk7158 24 дні тому

    great video thanks :)

  • @HarshitBhutani-u1u
    @HarshitBhutani-u1u 24 дні тому

    worked for me!

  • @HarshitBhutani-u1u
    @HarshitBhutani-u1u 24 дні тому

    nice explanation!

  • @felipecapelli2665
    @felipecapelli2665 24 дні тому

    Helped me a lot :) Thank you so much =D

  • @waynehawkins654
    @waynehawkins654 26 днів тому

    Nice. Love to see how to use JWT into this. I watch many videos and I always get a 404 not found. I sign in, and the API returns the JWT. I sigin into the API (top right) with Bearer {and token id}. And then try to access a Authorize http and bingo - I get 404 not 200 or 401. I'm going slowly crazy.

    • @scriptbytes
      @scriptbytes 25 днів тому

      That is a little weird. I'm not sure why you would get a 404. If you add [AllowAnonymous] to whichever endpoint you're calling (just for a quick test), does that change anything?

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

    In newer docker versions you can just call it 'compose.yaml" and you also don't need to add "version".

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

    Thank you very much! You helped me a lot and your explanation is amazing.

  • @periondemaman9247
    @periondemaman9247 29 днів тому

    I've followed all the steps and it said: denied: Unauthenticated request. Unauthenticated requests do not have permission "artifactregistry.repositories.uploadArtifacts" on resource "projects/celtic-current-426414-j0/locations/southamerica-east1/repositories/vozis" (or it may not exist) exit:1 did it like 20 times even if the same names that u've did.

  • @knotprasertsimla3969
    @knotprasertsimla3969 Місяць тому

    Thank you❤❤

  • @RafaelGamerAll
    @RafaelGamerAll Місяць тому

    Nice, but why all js functions start with "window.", its necessary?

    • @scriptbytes
      @scriptbytes 25 днів тому

      It attaches the function to the browser's window object, effectively making them global.

  • @DilanHamawandy
    @DilanHamawandy Місяць тому

    Thank you!

  • @PorkyPrank
    @PorkyPrank Місяць тому

    It also works for deploying a service that manage a telegram bot?

    • @scriptbytes
      @scriptbytes 25 днів тому

      I'm not sure what the requirements are for a telegram bot. Cloud Run is for short-lived requests. The maximum timeout is 1 hour, and it doesn't have a persistent disk (hard drive). If the bot can be run within those constraints, then yes.

  • @njf0523
    @njf0523 Місяць тому

    This is A+ content. Thanks so much, definitely a sub from me!

    • @scriptbytes
      @scriptbytes Місяць тому

      I appreciate that compliment, and the sub! Thanks for watching.

  • @diaconescutiberiu7535
    @diaconescutiberiu7535 Місяць тому

    I did everything listed in the video, but i cannot connect to the db via dbeaver client (i'm getting request time out). I tried checking stuff with chatgpt (all settings are correct, i can ping the external ip, i can connect to the db via GC's shell .. but not from dbeaver. I'm on Mac (drivers were installed). I'm stuck

  • @francogionardo
    @francogionardo Місяць тому

    Thanks so much. i was a suffering with a lot of issues, but your explanation is so clear. You have an image in docker, its necesary to tag, and to push to Artifact Registry and as a final step tu create a service in Cloud Ron to deploy the image.

  • @top_1_percent
    @top_1_percent Місяць тому

    Thanks a ton. This is very helpful for Mac users who love Microsoft Business Products and Services.

  • @tiendatnguyen6758
    @tiendatnguyen6758 Місяць тому

    really detaille , I love it

  • @marcosdayanmann3575
    @marcosdayanmann3575 Місяць тому

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

  • @munirmohamed1494
    @munirmohamed1494 Місяць тому

    I didn't expect it will work on JetBrain Rider, but it works well Thanks 💯

  • @thomasyuen8833
    @thomasyuen8833 Місяць тому

    Thank you very much for this video!!!!! I need it so bad and i just cannot find the right one until i saw yours!!!

  • @haithamdarweesh8781
    @haithamdarweesh8781 Місяць тому

    What in case I already have a table and I want to append data

  • @emericpetitgenet3512
    @emericpetitgenet3512 Місяць тому

    Dude you make it practical and easy to understand basic concepts for running mongoDB in docker. Enjoyed the video

    • @scriptbytes
      @scriptbytes Місяць тому

      I appreciate that, thank you!

  • @pegak
    @pegak Місяць тому

    Awesome, I was looking for this, thank you very much!

  • @hamadrehman853
    @hamadrehman853 Місяць тому

    Very useful video

  • @thomassansberro1869
    @thomassansberro1869 Місяць тому

    Thank you GOAT !

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

    Great video! So helpful worked right away.

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

    Would be nice another video describing how to use certificates to access sql server on docker (Linux)

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

    You are greate

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

    Thanks a lot! really helped : )

  • @CongNguyen-fi5cd
    @CongNguyen-fi5cd 2 місяці тому

    so helpful

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

    ... Now show us how to license it to run production workload 😏

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

      There’s another environment variable for that: MSSQL_PID Pass it your product id and you should be set learn.microsoft.com/en-us/sql/linux/sql-server-linux-configure-environment-variables?view=sql-server-2017#environment-variables

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

    Thank you so much for this video! I spent hours grappling with docker, gcloud, and node/express cuz I kept getting errors with the container failing to start and the port not being defined. After watching the video though I finally got my Cloud Run server up and running (turned out it was platform problem as I'm on ARM). This video was fantastic, thank you.

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

      That error is a pain because it’s so generic and can mean anything! I’m glad you’re up and running now!

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

    sudo docker run --name some-postgres -e POSTGRES_PASSWORD=BestPasswordEver -v postgres:/var/lib/postgresql/data -p 5432:5432 -d postgres Thank you

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

    Thank you, this was incredibly useful!

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

    Awesome video. Learnt so much :)

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

    Great content.