diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-06-24 16:04:19 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-06-24 16:04:19 -0400 |
| commit | 1b69dbd0897b21e9613c08811da5ca8e4c863cfa (patch) | |
| tree | d87afa6d0cb121166450da0d6bcb8b7df7dd1808 /server/lib/upload.js | |
| parent | d52c037ab7e01660a85363a2941052e4d4b8cf03 (diff) | |
putting mp4/webm videos on walls
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) |
