diff options
Diffstat (limited to 'bucky')
| -rw-r--r-- | bucky/app/bucky.js | 3 | ||||
| -rw-r--r-- | bucky/search/search.js | 1 | ||||
| -rw-r--r-- | bucky/util/upload.js | 2 |
3 files changed, 3 insertions, 3 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) diff --git a/bucky/search/search.js b/bucky/search/search.js index a4888ad..3bf882c 100644 --- a/bucky/search/search.js +++ b/bucky/search/search.js @@ -77,7 +77,6 @@ function search (query, start, limit, cb) { if (match.file) file_ids.push(match.file) return false }) - redisClient.quit() cb( { meta: { query: query, diff --git a/bucky/util/upload.js b/bucky/util/upload.js index e38fe30..dd82bf0 100644 --- a/bucky/util/upload.js +++ b/bucky/util/upload.js @@ -42,7 +42,6 @@ module.exports.put = function (opt) { } else { filename = uuid() + "." + extension; } - var remote_path = opt.dirname + filename if (types && ! extension) { @@ -75,7 +74,6 @@ module.exports.put = function (opt) { } var file_url = s3res.url || s3res.req.url - opt.success && opt.success(file_url) }).on('error', function(err, s3res){ console.error(err) |
