Pasteservice for your own pleasure https://www.bananas-playground.net/projekt/selfpaste/

Banana f8ed1d9715 finalize 1.1 version há 4 anos atrás
client 3bdc77d8c0 adding c-client for windows há 4 anos atrás
documentation 3ff8d25110 adding a simple webclient. há 4 anos atrás
webroot 3ff8d25110 adding a simple webclient. há 4 anos atrás
.gitignore 927bb6017e more init files há 4 anos atrás
CHANGELOG f8ed1d9715 finalize 1.1 version há 4 anos atrás
LICENSE ee90cc45c4 init of the repo há 4 anos atrás
README af34ad87da updated some stuff for first public release. Still beta... há 4 anos atrás
TODO 3bdc77d8c0 adding c-client for windows há 4 anos atrás
VERSION 6cb3623142 adding new version info and todo há 4 anos atrás

README

selfpaste is a small self hosting paste service.
https://www.bananas-playground.net/projekt/selfpaste/
It is not the aim to replace any other well know paste service. It is an experiment
and build for private use only.

This tool uses PHP fileinfo: https://www.php.net/manual/en/intro.fileinfo.php

> The functions in this module try to guess the content type and encoding of a file
> by looking for certain magic byte sequences at specific positions within the file.
> While this is not a bullet proof approach the heuristics used do a very good job.

It is not really bulletproof, but it does the job. Everything can be manipulated
to look alike something it isn't.

So, here is a friendly REMINDER:

- Use at own risk.
- Don't open it up to the public
- Check regularly what is added
- Clean everything what you do not know
- You provide the service by hosting it. Your are responsible for it!
- Change your secret often.

# Why json as a response?
In cases the upload is over post_max_size the request will not be "arrive".
Meaning the script does not receive enough information to work with.
In this case we return the start page. Which is a valid HTTP 200 status response.
So the client can not only rely in the HTTP status code alone.

# Third party resources
Link shortening inspired and some code used from: https://www.jwz.org/base64-shortlinks/