diff options
Diffstat (limited to 'server/lib/upload.js')
| -rw-r--r-- | server/lib/upload.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/lib/upload.js b/server/lib/upload.js index a5d7871..0f6c624 100644 --- a/server/lib/upload.js +++ b/server/lib/upload.js @@ -24,7 +24,9 @@ module.exports.put = function (key, file, opt) { var ts = moment().format('YYYYMMDD') var extension = acceptableuploadTypes[file.mimetype] - filename = (+now) + "-" + filename = (+now) + + (opt.username ? "-" + opt.username : "") + + "-" + file.originalname.replace(/\..*$/,"") .replace(/[^0-9a-zA-Z]+/g,"-") .substr(-128) |
