1#+Title: ReadMe2#+Options: toc:nil author:nil creator:nil34* Issue56Mail Lindsay Zhou <i@lin.moe>78* Usage9#+begin_src sh10# basic usage11echo "Hello world!" | curl p.koi.moe -Ff=@-1213# parse as markdown or orgmode file14curl p.koi.moe -Ff@<yourfile>.md15# or16curl p.koi.moe -Ff@<yourfile>.org1718# expire after 7 days19curl p.koi.moe -Ff=@<yourfile.ext> -Fexpire=72021# read max 5 times22curl p.koi.moe -Ff=@<yourfile.ext> -Fread=52324# Password protected25curl --user <user>:<password> p.koi.moe -Ff=@<yourfile.ext>2627# Create or update with speicifying key28# Notice: Only password protected notes can be updated and deleted29curl p.koi.moe/<key> -Ff=@<youfile.ext>3031# Delete32curl --user <user>:<password> -XDELETE p.koi.moe/<key>3334#+end_src3536* Content Limitation37#+begin_src38Content-Security-Policy: default-src 'none'; style-src 'self'; sandbox allow-downloads allow-forms allow-popups39#+end_src4041* Service Deployment42** Install43#+begin_src44git clone git://git.lin.moe/go/kpaste.git45cd kpaste46make && make install47#+end_src4849** Run50#+begin_src sh51kpaste serve --db /tmp/kpaste.db52# without --media flag, uploaded files will be stored in the sqlite database as blob type5354# or55kpaste serve --db /tmp/kpaste --media /tmp/media --upload-limit 302756#+end_src5758** Clean up59Run =kpaste clean --db <database_file> [--media <media_path>]= to clean expired data.6061** More help62#+begin_src63kpaste help64#+end_src6566* Todo67** support 2-level note key, and group notes together using the first level key