summaryrefslogtreecommitdiff
path: root/bucky/app/bucky.js
diff options
context:
space:
mode:
authorpep <yes@peepee.me>2020-07-28 08:49:23 +0000
committerpep <yes@peepee.me>2020-07-28 08:49:23 +0000
commitd051c6d71f2d2e24ca113f127ff7e0b143d0042a (patch)
treecbdb16aa708d3efe5eab6b291c6ee8baaeae94d0 /bucky/app/bucky.js
parent77720e1a510cb5311f77c8a63f920223c72f899a (diff)
fixed multiple files thing
Diffstat (limited to 'bucky/app/bucky.js')
-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)