From 0210507c2240a0ddf73d9028ccb532404eb77335 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 25 Dec 2018 11:36:10 +0100 Subject: [PATCH] added info on cstom hashes --- rtfm/API.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rtfm/API.md b/rtfm/API.md index 0b33774..e1dbce6 100644 --- a/rtfm/API.md +++ b/rtfm/API.md @@ -26,15 +26,22 @@ If there is an error the server will answer with status:err and a reason } ``` -### Example +### Examples -Uploading a file called test.jpg via curl +1. Uploading a file called test.jpg via curl ```curl -F "file=@test.jpg" https://pictshare.net/api/upload.php``` Answer from the server: ```{"status":"ok","hash":"y1b6hr.jpg","url":"https://pictshare.net/y1b6hr.jpg"}``` +2. Uploading a file called test.jpg via curl and requesting a custom hash + +```curl -F "file=@test.jpg" -F "hash=helloworld.jpg" https://pictshare.net/api/upload.php``` + +Answer from the server: +```{"status":"ok","hash":"helloworld.jpg","url":"https://pictshare.net/helloworld.jpg"}``` + --- ## pasetebin.php