From d051c6d71f2d2e24ca113f127ff7e0b143d0042a Mon Sep 17 00:00:00 2001 From: pep Date: Tue, 28 Jul 2020 08:49:23 +0000 Subject: fixed multiple files thing --- bucky/app/bucky.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bucky/app/bucky.js') diff --git a/bucky/app/bucky.js b/bucky/app/bucky.js index 47026a8..f104e3b 100644 --- a/bucky/app/bucky.js +++ b/bucky/app/bucky.js @@ -514,6 +514,9 @@ var bucky = module.exports = { privacy: false, storage: process.env.S3_BUCKET, } + console.log(data) + //this library encodes things twice so have to do it yourself + url = `http://media.spermwhale.info/bucky/data/${data.thread}/${encodeURI(data.filename)}` req.body.comment = (req.body.comment.length) ? req.body.comment + "
\n" + url + "\n" + file.originalname : url+"\n"+file.originalname db.createFile(data).then(function(file){ resolve(file) -- cgit v1.2.3-70-g09d2