- Видео 48
- Просмотров 300 413
ScriptBytes
США
Добавлен 7 дек 2019
My name is Jeff. My goal is to upload tech, gear, and programming videos focusing on the things that I use as a full time .Net and Angular developer.
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...
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 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 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 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
Просмотров 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.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 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 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 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 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 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 - 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 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 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 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...
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?
Danke!
how to on visual studio sir
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.
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
Try Thinkpad with Debian 12 instead pls.
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.
great video sir thank you
God bless you, the documentation is unclear and your video saves a lot of time. Thank you
Does it expire after a time limit lets say 30 days or 90 days?
Congrats, this is the only resource on the internet that I've found to deploy an Angular app using a Dockerfile!
Thanks! That was great!
Thanks. Happy codding.
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).
Thank you very much for this video. This is what I was looking for :-)
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" },
i have a question about how it know if your working env are dev / staging / prod so it could render the swagger
Never learnt docker in a better way! Found a gold mine
Great to hear! Thanks!
I am unable to connect using sa username
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.
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!
@@scriptbytes Take all your time, i only wanted to appreciate you, you're an awesome teacher. Best wishes.
Thank you for the really excellent video!
Glad you liked it!
Nice please do next js file upload with aws s3
Can i run other containers as well, alongside the PostgreSQL container. Like node app, redis etc.?....
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.
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
I'm glad this helped!
Hey, thanks for that, this is pretty useful, specially to do POC and stuff. Thanks again!
Great explanation, thanks a lot for saving time.
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-
Thank you so much for this great video!
you greatly helped me with my project too. Thank you so much for spending the time to make this content. I owe you.
Great video! Thanks! My question is how do I allocate volumes if I decide to host my container let's say on Google Cloud?
Thank you, an organized, clear and precise explanation to achieve the objective.
Brilliant, love that you showed the SQL and tips on optimizing the queries.
PS D:\mongoDB> docker compose up no configuration file provided: not found got this error
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.
Hi, thank you. Just one question, I'm getting 403
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?
You probably want to look into using Put SignedUrls. I’ve used those for large file uploads before and they work well
Great videos, Even works on the M3 mac
the mac m1 info is gold! thank you, you saved me hours of troubleshooting
Glad it helped!
Hi , how to send email notifications for failed cloud scheduler cron jobs?
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.
Muito bom me ajudou bastante, fico te devendo um café
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>
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.
@@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
Thanks 👍 With Love from India 🇮🇳
Thank you. Clear, concise and exactly the information I was looking for.
Glad it was helpful!
nce video.I need to authenticate an api which has username and password.I will try this basic authentication.
nice video
Thanks for you Nice nice
i dont have index.cshtml page. I just have app.razor
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.
how to call sp in PostgreSQL that returns rows ?
You would probably want to use FromSql<T>: learn.microsoft.com/en-us/ef/core/querying/sql-queries
@@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
Great presentation
well done, thanks for posting