Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/npm-registry-client/lib/upload.js')
-rw-r--r--node_modules/npm-registry-client/lib/upload.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/node_modules/npm-registry-client/lib/upload.js b/node_modules/npm-registry-client/lib/upload.js
index 2418997b4..f624a266c 100644
--- a/node_modules/npm-registry-client/lib/upload.js
+++ b/node_modules/npm-registry-client/lib/upload.js
@@ -3,12 +3,12 @@ module.exports = upload
var fs = require('fs')
, Stream = require("stream").Stream
-function upload (where, file, etag, nofollow, cb) {
+function upload (uri, file, etag, nofollow, cb) {
if (typeof nofollow === "function") cb = nofollow, nofollow = false
if (typeof etag === "function") cb = etag, etag = null
if (file instanceof Stream) {
- return this.request("PUT", where, file, etag, nofollow, cb)
+ return this.request("PUT", uri, { body : file, etag : etag, follow : !nofollow }, cb)
}
fs.stat(file, function (er, stat) {
@@ -17,6 +17,6 @@ function upload (where, file, etag, nofollow, cb) {
s.size = stat.size
s.on("error", cb)
- this.request("PUT", where, s, etag, nofollow, cb)
+ this.request("PUT", uri, { body : s, etag : etag, follow : !nofollow }, cb)
}.bind(this))
}