Skip to content
This repository has been archived by the owner on Mar 2, 2018. It is now read-only.

Commit

Permalink
base64 is available for parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
tmtk75 committed Jun 23, 2013
1 parent 0eaf6df commit 7ee5c7c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion routes/api.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ module.exports = (ctx)->
diagrams:
get: (req, res)->
res.setHeader "content-type", "image/png"
_diagrams false, unescape(req.query["data"]), req, res
if req.query["data"].match /%/
data = unescape req.query["data"]
else
data = new Buffer(req.query["data"], 'base64').toString('ascii')
_diagrams false, data, req, res

post: (req, res)->
_diagrams true, req.text, req, res

0 comments on commit 7ee5c7c

Please sign in to comment.