Get IPFS stored data size without downloading?

Hi everyone,

I am wondering if there is a good way to get the IPFS data stored size without downloading the actual data.

I would typically use a HTTP HEAD request but this seems to always return a 405 from infura.

I have also found “https://ipfs.infura.io:5001/api/v0/object/stat?arg=” API which returns “CumulativeSize” however it was unclear to me if this is the data stored under the given hash?

Can you confirm what the object stat endpoint does and also if there is a known/recommended way of grabbing the size without downloading it.

Cheers

1 Like

Hi James,

See this thread that is related Ipfs object patch api

Supporting a HEAD request isn’t supported now but is something we are tracking for inclusion in the future as our IPFS product evolves.

I hope this helps.