Comparing version 0.1.1 to 0.2.0
10
index.js
@@ -28,4 +28,4 @@ var knox = require('knox') | ||
uploader.emit('error', err); | ||
} else if (resp.statusCode === 200) { | ||
uploader.emit('end'); | ||
} else if (resp.statusCode === 200 || resp.statusCode === 307) { | ||
uploader.emit('end', resp.req.url); | ||
} else { | ||
@@ -50,3 +50,3 @@ uploader.emit('error', new Error("s3 http status code " + resp.statusCode)); | ||
downloader.emit('error', err); | ||
} else if (resp.statusCode === 200) { | ||
} else if (resp.statusCode === 200 || resp.statusCode === 307) { | ||
amountTotal = parseInt(resp.headers['content-length'], 10); | ||
@@ -61,3 +61,3 @@ headers = resp.headers; | ||
} else { | ||
downloader.emit('error', new Error("s3 http status code" + resp.statusCode)); | ||
downloader.emit('error', new Error("s3 http status code " + resp.statusCode)); | ||
} | ||
@@ -85,2 +85,2 @@ function removeListeners() { | ||
return downloader; | ||
}; | ||
}; |
{ | ||
"name": "s3", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "high level amazon s3 client using knox as a backend", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -25,4 +25,4 @@ Install: | ||
}); | ||
uploader.on('end', function() { | ||
console.log("done"); | ||
uploader.on('end', function(url) { | ||
console.log("file available at", url); | ||
}); | ||
@@ -29,0 +29,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4412
75