summaryrefslogtreecommitdiff
path: root/bucky/app
diff options
context:
space:
mode:
Diffstat (limited to 'bucky/app')
-rw-r--r--bucky/app/bucky.js3
1 files changed, 3 insertions, 0 deletions
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 + "<hr>\n" + url + "\n" + file.originalname : url+"\n"+file.originalname
db.createFile(data).then(function(file){
resolve(file)