Skip to content

Commit

Permalink
Upped to dffrnt.api v4.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
LeShaunJ committed Dec 31, 2019
1 parent a24fd52 commit fc36a62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions lib/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -829,16 +829,17 @@
if (!['PUT','POST'].has(method)||!!!files||!!!Uploads) return null;
// ---------------------------------------------------------
let fold = Uploads.Folder,
root = fold.root.replace(/^\//,''),
kind = (files.max>1?'array':'single'),
fdst = (files.dest||((prm, bdy, file) => '')),
fnme = (files.name||((prm, bdy, file) => file.originalname)),
fdst = (files.dest||(() => '')),
fnme = (files.name||((_p,_b,file) => file.originalname)),
stre = storer({
destination: function (req, file, cb) {
let prm = req.params, bdy = req.body,
dst = fdst(prm, bdy, file),
dir = fold.path(dst);
fs.mkdir(dir, 755, err=>cb(null, dir));
req.body.location = dst;
fs.mkdir(dir, 755, _err => cb(null, dir));
req.body.location = fold.join(root,dst);
},
filename: function (req, file, cb) {
let prm = req.params, bdy = req.body,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dffrnt.route",
"version": "4.0.2",
"version": "4.0.3",
"description": "An Express/SocketIO/Passport-based API Router",
"keywords": [
"api",
Expand Down Expand Up @@ -35,8 +35,8 @@
"cookie-parser": "1.4.3",
"cors": "2.8.4",
"crypto-token": "1.0.1",
"dffrnt.confs": "4.0.2",
"dffrnt.utils": "4.0.2",
"dffrnt.confs": "4.0.3",
"dffrnt.utils": "4.0.3",
"express": "4.16.3",
"express-limiter": "1.6.1",
"express-recaptcha": "4.0.2",
Expand Down

0 comments on commit fc36a62

Please sign in to comment.