Fetching Size Of GitHub Downloads With cURL
For my Raspberry Pi Image Manager project I wanted
to show a progress bar as an image is downloaded. This was easy as a simple HEAD
request would
include in the response a Content-Length
header telling me the size and allowing progress to be
calculated.
This worked until I wanted to include the RetroPie image. The RetroPie devs store their images on
GitHub, not a problem you might think, business as normal. GitHub however don't allow HEAD
requests to downloads, no idea why. So now I had no way of getting the image size without downloading
the whole image.
At least not without some hackery...
Read More