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

Saving binary file #33

Closed
pro100sanya opened this issue Aug 29, 2013 · 3 comments
Closed

Saving binary file #33

pro100sanya opened this issue Aug 29, 2013 · 3 comments

Comments

@pro100sanya
Copy link

Hello,

i am trying to download and save binary file (image).

needle.get(url, { output: path }, function (err, resp, body) {

});

But I have got the error:

{ [Error: ENOENT, open '$PATH_TO_FILE$FILENAME']
errno: 34,
code: 'ENOENT',
path: '$PATH_TO_FILE$FILENAME' }

Could you suggest why I am getting this?

p.s. i have existing directories on the fie path.
By the way, is there possibility to enable creating missed directories
recursively?

@tomas
Copy link
Owner

tomas commented Sep 2, 2013

This looks like an error on your end. Looks like you're passing '$PATH_TO_FILE$FILENAME' as the output path to needle instead of a real path.

@pro100sanya
Copy link
Author

If there any way to have error thrown from needle in such cases?

@tomas
Copy link
Owner

tomas commented Sep 2, 2013

But you got the ENOENT error. Isn't that an exception already?

@tomas tomas closed this as completed Sep 26, 2013
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

No branches or pull requests

2 participants