Hi folks, what is the best way to estimate directory sizes when a client has access only to a gateway and not a node? I figured that for files I could just send a HEAD and retrieve the size via Content-Length but for directories it does not look straightforward. It seems that the total size is part of the HTML response that is returned by the gateway but I was wondering whether gateways expose this via the API.
Hi @0xmichalis,
there isn’t an obvious way to do this in a more HTTP-native way currently. You could parse out the HTML, though I don’t think there’s any guarantee that all gateways will support this. Alternatively you could walk the tree, though I assume you’d rather not.
If you would like to see it added, please look at IPIPs!