Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 31a8990

Browse files
committed
chore: emit cbor stats - fixes #3325
1 parent 8004179 commit 31a8990

File tree

1 file changed

+4
-2
lines changed
  • packages/ipfs-core/src/components/files

1 file changed

+4
-2
lines changed

packages/ipfs-core/src/components/files/stat.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,12 @@ const statters = {
117117
* @returns {Stat}
118118
*/
119119
object: (file) => {
120-
// @ts-ignore - This is incompatible with Stat object
121-
// @TODO - https://github.com/ipfs/js-ipfs/issues/3325
122120
return {
123121
cid: file.cid,
122+
size: file.node.length,
123+
cumulativeSize: file.node.length,
124+
type: 'file', // for go compatibility
125+
blocks: 0,
124126
local: undefined,
125127
sizeLocal: undefined,
126128
withLocality: false

0 commit comments

Comments
 (0)