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

Комментарии • 20

  • @NicJackson
    @NicJackson  4 года назад +11

    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.

  • @rogvids
    @rogvids Год назад

    Please continue this channel. It's the best channel for these types of contents

  • @Arya-od8vx
    @Arya-od8vx 2 года назад +1

    I really enjoyed it so far,
    Thanks!

  • @SwimmingInSeas
    @SwimmingInSeas 5 лет назад +2

    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!

  • @mohammedbadusha5353
    @mohammedbadusha5353 3 года назад

    Hi Nic ..Daily i am learning from your videos. Thank you once again

  • @bolajiolumide1378
    @bolajiolumide1378 4 года назад +2

    Thanks so much Nic, I have learnt a lot and I keep looking forward to the new uploads.

  • @rogvids
    @rogvids Год назад +3

    The problem is off camera code change :-(

  • @sovrinfo
    @sovrinfo 2 года назад

    Awesome, Big Thanks!

  • @vishnuvardhan9847
    @vishnuvardhan9847 3 года назад

    Thanks for sharing knowledge. When we should define pointer fields in struct type golang ?

  • @fresonn
    @fresonn 5 лет назад +1

    Will there be a video about the deployment of Go microservices?

    • @NicJackson
      @NicJackson  5 лет назад +5

      Yes I will be looking at that in an up and coming video

  • @topsu80
    @topsu80 4 года назад +3

    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

    • @NicJackson
      @NicJackson  4 года назад +1

      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.

    • @topsu80
      @topsu80 4 года назад +1

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

  • @vtvvnha2230
    @vtvvnha2230 5 лет назад +2

    the sound is smaller than other videos

    • @NicJackson
      @NicJackson  5 лет назад +1

      Sorry about that, my Mic cable is picking up loads of static. I have a new cable coming

  • @PlanetoftheGaming
    @PlanetoftheGaming 4 года назад

    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

    • @NicJackson
      @NicJackson  4 года назад +2

      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.

  • @eddwinpaz
    @eddwinpaz 5 лет назад

    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.

    • @NicJackson
      @NicJackson  5 лет назад +1

      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.