I've been attempting to fetch the file size (without downloading the contents) of an object using this package, but I don't think it's possible. I've been examining the headers returned by GetReader. They do contain a Content-Length header, but it is 0. newGetter uses the http response ContentLength field, which apparently is set correctly, but for some reason the http header is not also set. Are you aware of another way to get the file size? Or is it possible to expose an API that does it, or manually set the Content-Length header?
I've been attempting to fetch the file size (without downloading the contents) of an object using this package, but I don't think it's possible. I've been examining the headers returned by GetReader. They do contain a
Content-Length
header, but it is 0. newGetter uses the http response ContentLength field, which apparently is set correctly, but for some reason the http header is not also set. Are you aware of another way to get the file size? Or is it possible to expose an API that does it, or manually set the Content-Length header?