ScriptBytes
ScriptBytes
  • Видео 48
  • Просмотров 300 413
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/tre...
Просмотров: 2 418

Видео

NextJS Upload to Google Cloud StorageNextJS Upload to Google Cloud Storage
NextJS Upload to Google Cloud Storage
Просмотров 4,6 тыс.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/authe...
Task WhenAll vs Parallel ForEachTask WhenAll vs Parallel ForEach
Task WhenAll vs Parallel ForEach
Просмотров 7438 месяцев назад
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 APIMemory Cache in Dotnet API
Memory Cache in Dotnet API
Просмотров 3888 месяцев назад
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.Net 8 API Role Based Authorization
.Net 8 API Role Based Authorization
Просмотров 6 тыс.8 месяцев назад
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.5Blazor 8 Docker | Build a Blog - Ep 04.5
Blazor 8 Docker | Build a Blog - Ep 04.5
Просмотров 2 тыс.8 месяцев назад
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 05Blazor Blog Data Structures | Build a Blog - Ep 05
Blazor Blog Data Structures | Build a Blog - Ep 05
Просмотров 2908 месяцев назад
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 04Blazor Server Code Syntax Highlighting with Highlight.js | Build a Blog - Ep 04
Blazor Server Code Syntax Highlighting with Highlight.js | Build a Blog - Ep 04
Просмотров 5499 месяцев назад
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 03Blazor Render Fragments | Build a Blog - Ep 03
Blazor Render Fragments | Build a Blog - Ep 03
Просмотров 4259 месяцев назад
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 02Blog Layout and Design | Build a Blog - Ep 02
Blog Layout and Design | Build a Blog - Ep 02
Просмотров 6099 месяцев назад
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 01Add Tailwind CSS to Blazor! | Build a Blog - Ep 01
Add Tailwind CSS to Blazor! | Build a Blog - Ep 01
Просмотров 2,1 тыс.10 месяцев назад
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 - IntroductionBuild a Blog in Blazor! Tutorial | Ep 00 - Introduction
Build a Blog in Blazor! Tutorial | Ep 00 - Introduction
Просмотров 66010 месяцев назад
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 8Entity Framework Web API Tutorial .Net 8
Entity Framework Web API Tutorial .Net 8
Просмотров 4 тыс.10 месяцев назад
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 RegistryManually Deploy to Cloud Run - Updated for Artifact Registry
Manually Deploy to Cloud Run - Updated for Artifact Registry
Просмотров 6 тыс.11 месяцев назад
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 RegistryDeploy to Cloud Run using Cloud Build and Artifact Registry
Deploy to Cloud Run using Cloud Build and Artifact Registry
Просмотров 2,9 тыс.11 месяцев назад
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...

Комментарии

  • @firlytaufikurohman6922
    @firlytaufikurohman6922 День назад

    hi, i have some issue when i migrated with enum data type, inside my db it should be enum instead of int do you know how to fix that?

  • @vornamenachname906
    @vornamenachname906 3 дня назад

    Danke!

  • @vietnguyen2521
    @vietnguyen2521 3 дня назад

    how to on visual studio sir

  • @lukemanning3825
    @lukemanning3825 5 дней назад

    Had so much trouble getting the MongoDB setup for my new Unifi controller, no one else seems to document the username/password configuration options, thanks a bunch.

  • @y0dasmydad
    @y0dasmydad 12 дней назад

    Very helpful video, was pulling my hair out trying to figure out why this wouldn't work. Thanks for 'highlighting' 👀the link to that page in the docs

  • @pal-v3d
    @pal-v3d 12 дней назад

    Try Thinkpad with Debian 12 instead pls.

  • @BedirBayar
    @BedirBayar 14 дней назад

    It's a clear tutorial but you never show problem cases. It always works with you perfectly and you never fix a problem in your tutorial. For example in connection stage, I could not connect from azure data studio. The rest of the tutorial for me was google.

  • @sksohelrahaman3898
    @sksohelrahaman3898 14 дней назад

    great video sir thank you

  • @pavelpichugin-nd7ox
    @pavelpichugin-nd7ox 15 дней назад

    God bless you, the documentation is unclear and your video saves a lot of time. Thank you

  • @Buckanian
    @Buckanian 17 дней назад

    Does it expire after a time limit lets say 30 days or 90 days?

  • @williambonvini5806
    @williambonvini5806 17 дней назад

    Congrats, this is the only resource on the internet that I've found to deploy an Angular app using a Dockerfile!

  • @caiorodrigues6871
    @caiorodrigues6871 17 дней назад

    Thanks! That was great!

  • @filiperossell6138
    @filiperossell6138 19 дней назад

    Thanks. Happy codding.

  • @themcr413
    @themcr413 21 день назад

    Very nice tutorial ! One mention, in the handler code, at line 50, when you wrote username != “like” && password != “subscribe” you shouldn’t use the AND operator but rather the OR operator. With the AND operator, if just one is different and the other is equal it will pass with a success result. If you put OR, if either one is different and one is equal, it will fail (as it should because both need to be equal in order to succeed).

  • @raphaellukas3328
    @raphaellukas3328 21 день назад

    Thank you very much for this video. This is what I was looking for :-)

  • @developmentroselino
    @developmentroselino 22 дня назад

    for publishing i think should add this, to automate build tailwind on .csproj : <Target Name="Tailwind Build Command" BeforeTargets="Build" Condition="'$(Configuration)' == 'Release'"> <Message Text="build tailwind" Importance="high"/> <Exec Command="npm run build"/> </Target> on package.json : "scripts": { "watch": "npx tailwindcss -i .\\tailwind.css -o .\\wwwroot\\app.css --watch", "build": "npx tailwindcss -i .\\tailwind.css -o .\\wwwroot\\app.css --minify" },

  • @nostew1604
    @nostew1604 22 дня назад

    i have a question about how it know if your working env are dev / staging / prod so it could render the swagger

  • @UtkarshKoppikar
    @UtkarshKoppikar 27 дней назад

    Never learnt docker in a better way! Found a gold mine

  • @WaqarArshad-fq9ls
    @WaqarArshad-fq9ls 29 дней назад

    I am unable to connect using sa username

  • @abc_cba
    @abc_cba Месяц назад

    You have such an easy way of explaning without complexity being added over it. Best wishes, I wanted to sub you but I guess, that you stopped posting videos. All the greetings from India.

    • @scriptbytes
      @scriptbytes 26 дней назад

      Ya I haven't posted in a while. Between kids, family, summer, and a new position at work, I've taken a break. I'm hoping to start posting again now that summer is over and things are slowing down. Thanks for watching!

    • @abc_cba
      @abc_cba 26 дней назад

      @@scriptbytes Take all your time, i only wanted to appreciate you, you're an awesome teacher. Best wishes.

  • @carterrhea3490
    @carterrhea3490 Месяц назад

    Thank you for the really excellent video!

  • @AjaySingh-jz8qx
    @AjaySingh-jz8qx Месяц назад

    Nice please do next js file upload with aws s3

  • @faisalahamedrahat1359
    @faisalahamedrahat1359 Месяц назад

    Can i run other containers as well, alongside the PostgreSQL container. Like node app, redis etc.?....

    • @scriptbytes
      @scriptbytes 26 дней назад

      You certainly can. Just keep an eye on resource usage if you try and stay in the free tier. It's a pretty small sized server and you may need more resources soon.

  • @prasunsharma5495
    @prasunsharma5495 Месяц назад

    New to google cloud and been trying to upload docker image to the artifact registry and got a lot of errors. Couldn't find solution anywhere, not in documentation or chatgpt. This finally worked. Thanks alot

  • @vmdcortes
    @vmdcortes Месяц назад

    Hey, thanks for that, this is pretty useful, specially to do POC and stuff. Thanks again!

  • @iam.devangmp
    @iam.devangmp Месяц назад

    Great explanation, thanks a lot for saving time.

  • @DhananjaySingh-kp3jx
    @DhananjaySingh-kp3jx Месяц назад

    Hi sir, gettin this error Error generating signed URL: TypeError: url__WEBPACK_IMPORTED_MODULE_1__.URL is not a constructor at URLSigner.getSignedUrlV4 (signer.js:154:22) at URLSigner.getSignedUrl (signer.js:96:28) at File.getSignedUrl (file.js:2386:14) at eval (index.js:57:28) at new Promise (<anonymous>) at File.wrapper (index.js:42:16) at GetSignedUrl (VM4006 actions.ts:18:34) at HandleSubmit (index.tsx:12:35) at HTMLUnknownElement.callCallback (react-dom.development.js:19467:14) at Object.invokeGuardedCallbackImpl (react-

  • @PsychPatric
    @PsychPatric Месяц назад

    Thank you so much for this great 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.

  • @valeriy9862
    @valeriy9862 Месяц назад

    Great video! Thanks! My question is how do I allocate volumes if I decide to host my container let's say on Google Cloud?

  • @personal2477
    @personal2477 Месяц назад

    Thank you, an organized, clear and precise explanation to achieve the objective.

  • @marketfinds
    @marketfinds Месяц назад

    Brilliant, love that you showed the SQL and tips on optimizing the queries.

  • @fatimarani6544
    @fatimarani6544 2 месяца назад

    PS D:\mongoDB> docker compose up no configuration file provided: not found got this error

  • @celebrando_a_vida
    @celebrando_a_vida 2 месяца назад

    Thank you for the demonstration. I created a table with specific columns and want to import .csv file but which will import only the columns you define in the table.

  • @JorgeBenavidesQ
    @JorgeBenavidesQ 2 месяца назад

    Hi, thank you. Just one question, I'm getting 403

  • @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

  • @sir_ken9767
    @sir_ken9767 2 месяца назад

    Great videos, Even works on the M3 mac

  • @timtrueblood6734
    @timtrueblood6734 2 месяца назад

    the mac m1 info is gold! thank you, you saved me hours of troubleshooting

  • @CD-xd6fm
    @CD-xd6fm 2 месяца назад

    Hi , how to send email notifications for failed cloud scheduler cron jobs?

    • @scriptbytes
      @scriptbytes 2 месяца назад

      Probably the easiest way is to set up an Alert. There are a couple ways to create it, but the easiest might be: Go to the Logs Explorer and add the filters you would like that apply to your cloud scheduler jobs. Once your filter is right, there is a "Create Alert" button on the the Logs Explorer page. Click that and follow the wizard to set up an alert to email you.

  • @flaviocorreia4462
    @flaviocorreia4462 2 месяца назад

    Muito bom me ajudou bastante, fico te devendo um café

  • @tafadzwatapera1820
    @tafadzwatapera1820 2 месяца назад

    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 2 месяца назад

      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 2 месяца назад

      @@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 2 месяца назад

    Thanks 👍 With Love from India 🇮🇳

  • @mikegreiling
    @mikegreiling 2 месяца назад

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

  • @srikalyanlingamaneni8089
    @srikalyanlingamaneni8089 2 месяца назад

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

  • @atakanozkan1598
    @atakanozkan1598 2 месяца назад

    nice video

  • @renanvolkers
    @renanvolkers 2 месяца назад

    Thanks for you Nice nice

  • @SupriyaDeshmukh-nl8si
    @SupriyaDeshmukh-nl8si 2 месяца назад

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

    • @scriptbytes
      @scriptbytes 2 месяца назад

      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 2 месяца назад

    how to call sp in PostgreSQL that returns rows ?

    • @scriptbytes
      @scriptbytes 2 месяца назад

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

    • @amnashahid9464
      @amnashahid9464 2 месяца назад

      @@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 2 месяца назад

    Great presentation

  • @PilotGT
    @PilotGT 2 месяца назад

    well done, thanks for posting