README ¶ #+Title: ReadMe #+Options: toc:nil author:nil creator:nil * Usage #+begin_src sh # basic usage echo "Hello world!" | curl p.koi.moe -Ff=@- # parse as markdown or orgmode file curl p.koi.moe -Ff@<yourfile>.md # or curl p.koi.moe -Ff@<yourfile>.org # expire after 7 days curl p.koi.moe -Ff=@<yourfile.ext> -Fexpire=7 # read max 5 times curl p.koi.moe -Ff=@<yourfile.ext> -Fread=5 # Password protected curl --user <user>:<password> p.koi.moe -Ff=@<yourfile.ext> # Create or update with speicifying key # Notice: Only password protected notes can be updated and deleted curl p.koi.moe/<key> -Ff=@<youfile.ext> # Delete curl --user <user>:<password> -XDELETE p.koi.moe/<key> #+end_src * Content Limitation #+begin_src Content-Security-Policy: default-src 'none'; style-src 'self'; sandbox allow-downloads allow-forms allow-popups #+end_src * Service Deployment ** Install #+begin_src go install git.sr.ht/~lindsay/kpaste@latest #+end_src Or #+begin_src git clone https://git.sr.ht/~lindsay/kpaste cd kpaste go build . #+end_src ** Run #+begin_src sh kpaste serve --db /tmp/kpaste.db # without --media flag, uploaded files will be stored in the sqlite database as blob type # or kpaste serve --db /tmp/kpaste --media /tmp/media --upload-limit 3027 #+end_src ** Clean up Run =kpaste clean --db <database_file> [--media <media_path>]= to clean expired data. ** More help #+begin_src kpaste help #+end_src Expand ▾ Collapse ▴ Documentation ¶ There is no documentation for this package. Source Files ¶ View all Source files api.go main.go mux.go render.go storage.go Click to show internal directories. Click to hide internal directories.