From dc832705951007557b8e98feac7aecccc2c98ffb Mon Sep 17 00:00:00 2001 From: Banana Date: Sat, 26 Apr 2025 10:03:11 +0200 Subject: [PATCH] markdown readme file Signed-off-by: Banana --- README => README.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) rename README => README.md (55%) diff --git a/README b/README.md similarity index 55% rename from README rename to README.md index 49a9397..df413e1 100644 --- a/README +++ b/README.md @@ -1,16 +1,16 @@ -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 known paste service. -It is an experiment and build for private use only. +# selfpaste -This tool uses PHP fileinfo: https://www.php.net/manual/en/intro.fileinfo.php +[selfpaste](https://www.bananas-playground.net/projekt/selfpaste/) is a small self hosting paste service. -> 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 the aim to replace any other well known paste service. It is an experiment and build for private use only. -It is not really bulletproof, but it does the job. -Everything can be manipulated to look alike something it isn't. +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: @@ -22,10 +22,12 @@ So, here is a friendly REMINDER: - Change your secret often. # Why json as a response? + In cases the upload is over post_max_size the request will not "arrive". Meaning the script does not receive enough information to work with. In this case it returns the start page. Which is a valid HTTP 200 status response. So the client can not only rely on the HTTP status code alone. # Third party resources + Link shortening inspired and some code used from: https://www.jwz.org/base64-shortlinks/ -- 2.39.5