Comments (2)
Are you using content._readableState.length
? Firstly, I would suggest not depending on this value, by convention underscore prefixed members are considered private and are not usually part of the public API.
Secondly, streams by their nature are not guaranteed to know their length before they are consumed. There is nothing in the public API for streams that allows you to know this.
You could consume the stream and then you'd know the length or you can use ipfs.ls
to get size information for a given file.
Hope that helps.
from js-ipfs-http-client.
Hello? :(
from js-ipfs-http-client.
Related Issues (20)
- wrap-with-directory no working for latest few versions (39.0+ for sure) HOT 5
- Need some help I try to npm install --save ipfs-http-client HOT 2
- addFromFs doesn't include headers that are injected during api initialization HOT 6
- when i excute 'npm run dev' ,then throws a error HOT 1
- Bad tag? HOT 2
- Migration of License from MIT to Dual MIT/Apache2.0 HOT 2
- SyntaxError: Unexpected reserved word HOT 2
- Does not work in Node.js 13 HOT 1
- Re-license js-ipfs-http-client to MIT + Apache 2 HOT 37
- Not working on Node.js 13 HOT 2
- There is an Alex in my Chrome browser... HOT 2
- 0.40.1 does not print anything HOT 6
- src/files/ls.js uses incorrect long listing option name HOT 1
- Problems getting root hash for static sites re-uploaded as Buffers HOT 8
- Failed to construct 'URL': Invalid URL HOT 5
- Linter should enforce coding style rules that will gate merging PRs HOT 4
- Bump stream-to-it version once a PR lands there to handle response body that is undefined HOT 3
- How to find out whether an IPFS hash is a directory or file? HOT 1
- Unable to add content with the 42.0.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-ipfs-http-client.