lakenen / node-box-view

A node client for the Box View API
MIT License
13 stars 2 forks source link

Incorrect response on uploadFile #1

Closed dottodot closed 10 years ago

dottodot commented 10 years ago

I have the following to upload a file

var file = req.files.file.path;
client.documents.uploadFile(file, function (err, res) {
if (err) {
    console.log(err);
    return;
}
res.send(res);
});

but I'm getting a successful response through the err callback not the res callback.

lakenen commented 10 years ago

Wow, good catch. Looks like the statusCode can be 202 for that response, which is causing the default handler to think it was a failure. I'll patch this up today. Thanks!