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

Fix cannot read file from path using rest.file() #252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lekhacman
Copy link

fs.read() expects <Buffer | Uint8Array> at the second arguments (Node 8.x) but received a number.

@arbaaz
Copy link

arbaaz commented Nov 7, 2017

Can we merge this PR?

@arbaaz
Copy link

arbaaz commented Nov 7, 2017

Fatal error: Second argument needs to be a buffer

@fpavlik
Copy link

fpavlik commented Jan 13, 2018

The same problem.
binding.read(fd, buffer, offset, length, position, req); TypeError: Second argument needs to be a buffer
How to fix it?

@lekhacman lekhacman closed this Jan 13, 2018
@lekhacman
Copy link
Author

@fpavlik
I have fixed the issue in the pull request but looks like this repository has no maintainer. So, you can go ahead with 2 options:

  • Use a different, well-maintained library (such as "request"...) (personally recommend this option)

  • If you want to stick with restler, then use rest.data() instead of rest.file()

@lekhacman lekhacman reopened this Jan 13, 2018
@fpavlik
Copy link

fpavlik commented Jan 13, 2018

thanks, men!)
Good luck

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.

4 participants