Open polyrainbow opened 1 year ago
This is important, thanks for filing it.
Content-Length
will make sense for anything that we currently encode using paged BodyChunkIpld
. This is almost everything except for the SphereIpld
and its related substructure.
Perhaps putting it another way: any raw binary content can benefit from Content-Length
, and any structured IPLD probably cannot.
As a developer working on a webapp with Noosphere integration, I want to have a way to get the file size of a file stored in a sphere, without having to "consume" and free the file by calling
SphereFile.intoBytes()
. To achieve this functionality, all memos referring to byte streams should have a canonical/well-knowncontent-length
header. Also, theSphereFile
interface of the NPM package should have a method to return the file size, e. g.SphereFile.size()
.Related Discord chat: https://discord.com/channels/1003419732516552724/1003501801452085298/1125016166482579496
Related issue: https://github.com/subconsciousnetwork/noosphere/issues/43