Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_readableState is private, use byteCount #2

Closed
wants to merge 1 commit into from
Closed

_readableState is private, use byteCount #2

wants to merge 1 commit into from

Conversation

robertrossmann
Copy link
Contributor

Fixes #1

@lukasredev
Copy link
Owner

It's strange: If I use the module in my own project byteCount is working fine, but when running the sails-adapter-tests byteCount seems to be undefined. This was the reason why I changed it to _readableState.length, because it seems to be always working ...

@robertrossmann
Copy link
Contributor Author

I could try having a look at those tests... I suspect that the _readableState only represents the part of the upload that is immediately available for processing, which may or may not be the whole dataset.

Further reading at IO.js (should apply to Node.js, too).

@robertrossmann
Copy link
Contributor Author

The byteCount property comes from multiparty, the body parser that Skipper uses internally. It is then quite likely that the property is not set when doing some test mockups.

On a side note, I wonder why Azure requires explicit content-length... None of the other "big guys", S3, GridFS, or Google Cloud Storage adapters need to provide this. Could there perhaps be a different way of uploading files to Azure without having to know the content-length in advance?

@lukasredev
Copy link
Owner

Ok thanks for the information.
Yes this seemed kind of weird to me either. Maybe you could open an issue or write someone on the azure-storage project?

lukasredev added a commit that referenced this pull request Mar 25, 2015
@lukasredev lukasredev closed this Oct 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only first 65 397 bytes get uploaded
2 participants