Skip to content

Commit

Permalink
update fdfs to 0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ymyang committed Mar 7, 2016
1 parent e26623b commit 7df1e1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions lib/FdfsStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,13 @@ FdfsStorage.prototype._handleFile = function(req, file, cb) {
ext: ext
};

var _self = this;
_self.fdfs.upload(file.stream, options, function (err, fileId) {
if (err) {
cb(err);
return;
}
this.fdfs.upload(file.stream, options).then(function(fileId) {
cb(null, {
filename: fileId,
size: size
});
});
return;
}).catch(cb);
};

FdfsStorage.prototype._removeFile = function(req, file, cb) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "multer-fdfs-storage",
"version": "1.0.4",
"version": "1.1.0",
"description": "multer storage for fastdfs",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 7df1e1b

Please sign in to comment.