added info on cstom hashes

This commit is contained in:
Chris
2018-12-25 11:36:10 +01:00
parent b66a1f2a55
commit 0210507c22

View File

@@ -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``` ```curl -F "file=@test.jpg" https://pictshare.net/api/upload.php```
Answer from the server: Answer from the server:
```{"status":"ok","hash":"y1b6hr.jpg","url":"https://pictshare.net/y1b6hr.jpg"}``` ```{"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 ## pasetebin.php