Building Microservices with Go: 10 Handling files with the Go standard library
HTML-код
- Опубликовано: 8 фев 2025
- Weekly live stream which teaches how to build Microservices using the Go programming language.
In this episode you will learn how to upload and serve files using the Go standard library.
Source:
github.com/nic...
Contents:
http.Request ( • Building Microservices... )
Configuring Gorilla for file paths ( • Building Microservices... )
Dependency injection for handlers ( • Building Microservices... )
http.FileServer ( • Building Microservices... )
Series Content:
Over the weeks we will look at the following topics, teaching you everything you need to know regarding building microservices with the go programming language:
Introduction to microservices
RESTFul microservices
gRPC microservices
Packaging applications with Docker
Testing microservice
Continuous Delivery
Observability
Using Kubernetes
Debugging
Security
Asynchronous microservices
Caching
Microservice reliability using a Service Mesh
Hey so I apologise here, I made a typo when I was POSTing the original image, if you look at this point
ruclips.net/video/ctmhYJpGsgU/видео.html
You will see I do something like `curl -vv localhost:9090/images/1/test.png -X POST --d @test.png` the `-d` in curl will post data BUT it will do so as plain text. To upload binary files like images in curl you need to use the ``--data-binary` flag instead.
Please continue this channel. It's the best channel for these types of contents
I really enjoyed it so far,
Thanks!
Thanks for doing these videos - you're a great teacher! I don't often have the inclination to keep writing code after spending all my workdays writing python, but will happily put on one of your videos while cooking / breakfasting at the weekend, and then have a play. Much appreciated!
Hi Nic ..Daily i am learning from your videos. Thank you once again
Thanks so much Nic, I have learnt a lot and I keep looking forward to the new uploads.
The problem is off camera code change :-(
Awesome, Big Thanks!
Thanks for sharing knowledge. When we should define pointer fields in struct type golang ?
Will there be a video about the deployment of Go microservices?
Yes I will be looking at that in an up and coming video
Thanks for these videos, really good series.
However I think there is some issue with the code. The downloaded image size is only 446K, while the original image size is 816K. Any idea why? I was doing the same code on my computer and first thought I made some error, but looking at 28:00 in the video it shows the image size of the downloaded image test2.png is 446K and in GitHub the frappucino.png is 816K.
Edit: uploading the file with following command works: curl localhost:9090/images/1/test.png --data-binary @test.png
Hey so I apologise here, I made a typo when I was POSTing the original image, if you look at this point
ruclips.net/video/ctmhYJpGsgU/видео.html
You will see I do something like `curl -vv localhost:9090/images/1/test.png -X POST --d @test.png` the `-d` in curl will post data BUT it will do so as plain text. To upload binary files like images in curl you need to use the ``--data-binary` flag instead.
Sorry for the confusion here, I have updated the readme, and I am going to pin your comment to the video.
@@NicJackson Thanks for the reply. I managed to get it working now by using `curl localhost:9090/images/1/test.png --data-binary @test.png` to upload the file. :D
Keep up the good work!
the sound is smaller than other videos
Sorry about that, my Mic cable is picking up loads of static. I have a new cable coming
I'm having a little problem, the handler work perfectly, but once i get the images back my pc can't open them anymore, does anyone have the same problem?
Great series
Hi there, sorry I made a typo in the video when executing the curl command..
You will see I do something like `curl -vv localhost:9090/images/1/test.png -X POST --d @test.png` the `-d` in curl will post data BUT it will do so as plain text. To upload binary files like images in curl you need to use the ``--data-binary` flag instead.
can you also teach plz. how to do when arriving on kubernetes how to do multiple services on a single ingress and path them on different url paths. would be cool.
I think I will change the format, I will try to do a weekly Building Microservices but do a mid week topic like ingress which is related but not directly so to the material.