diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-03-31 18:08:27 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-03-31 18:08:27 +0200 |
| commit | 89f3dcb22f20d6914e451d4a2c6caa20d8e4969e (patch) | |
| tree | af8c435d1934701d3d2ffa1090923ea4a5076ec8 | |
| parent | 731001ca8d6b2af6093cf706a0d7c596b6bddac8 (diff) | |
append
| -rw-r--r-- | lib/index.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/index.js b/lib/index.js index 781ac04..d0f5e76 100644 --- a/lib/index.js +++ b/lib/index.js @@ -103,6 +103,11 @@ site.init = function(){ tag: sanitize(req.body.tag) || 'plop', remote_addr: req.ip || '127.0.0.1', }).then(function(image){ + if (process.env.SEND_ASCII && req.body.ascii && req.body.ascii.length < 800 * 100) { + var stream = fs.createWriteStream("/home/panke/irc/irc.asdf.us/#ascii/in", {flags:'a'}) + stream.write(req.body.ascii + "\n") + stream.end() + } res.json({ success: true, size: req.file.size, |
