Add upload page
Implement minimal upload features
Set default view count to 0
A paste and file upload service with HTML and terminal syntax highlighting.
$ curl -F'file=@path.ext' p.cats.sh
https://p.cats.sh/abcd
Retrieve uploaded content through the endpoints below. Terminal syntax highlighting returns pastes highlighted using terminal escape sequences making it great for command-line use (e.g. curl
). The canonical paths are as follows:
GET /<id> raw
GET /<id>. guessed HTML syntax highlighting
GET /<id>.<lang> forced HTML syntax highlighting for language <lang>
GET /<id>+ guessed terminal syntax highlighting
GET /<id>+<lang> forced terminal syntax highlighting for language <lang>
The following paths also exist for compatability[^1] with other paste services (e.g. ix.io) or ease of use:
GET /<id>/ --> /<id>.
GET /<id>/<lang> --> /<id>.<lang>
GET /<id>.+ --> /<id>+
GET /<id>.<lang>+ --> /<id>+<lang>
[^1]: Compatability only in URL paths and some parameters (improvements welcome). Highlighting output will not be identical.
Pastry can accept configuration options from environment variables or a configuration file located at /etc/pastry/pastry.conf
. The configuration file uses the same KEY=VALUE
format as environment variables. Environment variables take priority over those set in configuration files.
See the defaults.conf
file for configuration options.
AGPLv3, see LICENSE.
Copyright © 2022-2023 Steven Guikal