Tracking Http Upload Progress Using Golang

I wrote a simple cli tool to upload files to my Cloudreve instance. It’s easy to figure out which api to call when uploading files. However, it will be helpful to know how the upload is going. Visualizing Speed When creating an upload request, golang allows us to use a io.Reader as the request body. The body will be responsible for displaying upload progress. info Although Cloudreve and its storage providers require Content-Length header to be set, thus requiring the total length to be known beforehand, this method is applicable even if the total is unknown....

published on December 10, 2023 · 3 min · 574 words