mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-11 18:56:21 +00:00
more readmes
This commit is contained in:
14
README.md
14
README.md
@@ -5,6 +5,15 @@
|
|||||||
# This is the development branch for Version 2 do not use in production
|
# This is the development branch for Version 2 do not use in production
|
||||||
Test site: https://dev.pictshare.net/ (only sometimes on)
|
Test site: https://dev.pictshare.net/ (only sometimes on)
|
||||||
|
|
||||||
|
Table of contents
|
||||||
|
=================
|
||||||
|
* [Installation](/rtfm/INSTALL.md)
|
||||||
|
* [Docker](/rtfm/DOCKER.md)
|
||||||
|
* [API](/rtfm/API.md)
|
||||||
|
* [Addons/Integration](/rtfm/INTEGRATIONS.md)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## New Features in v2:
|
## New Features in v2:
|
||||||
|
|
||||||
- Added text hosting (like pastebin)
|
- Added text hosting (like pastebin)
|
||||||
@@ -12,10 +21,15 @@ Test site: https://dev.pictshare.net/ (only sometimes on)
|
|||||||
- Added WebP to images (and conversion from jpg,png to webp)
|
- Added WebP to images (and conversion from jpg,png to webp)
|
||||||
- Massive code rework. Actually we designed it from the ground up to be more modular and easier to debug
|
- Massive code rework. Actually we designed it from the ground up to be more modular and easier to debug
|
||||||
|
|
||||||
|
## Breaking changes
|
||||||
|
|
||||||
|
- New API system. Only single file uploads now via /api/upload.php (POST var name is "file"). [read more..](/rtfm/API.md)
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||
- [x] Duplicate detection
|
- [x] Duplicate detection
|
||||||
- [x] Write permission detection
|
- [x] Write permission detection
|
||||||
|
- [ ] Upload via link
|
||||||
|
|
||||||
### Config options
|
### Config options
|
||||||
|
|
||||||
|
|||||||
55
rtfm/API.md
Normal file
55
rtfm/API.md
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
# API
|
||||||
|
|
||||||
|
## upload.php
|
||||||
|
|
||||||
|
- URL https://pictshare.net/api/upload.php
|
||||||
|
- Method: POST file
|
||||||
|
- Post var name: file
|
||||||
|
- Answer type: JSON
|
||||||
|
|
||||||
|
If the upload was successful answer will look like this
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"status":"ok",
|
||||||
|
"hash":"y1b6hr.jpg",
|
||||||
|
"url":"https://pictshare.net/y1b6hr.jpg"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
If there is an error the server will answer with status:err and a reason
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"status":"err",
|
||||||
|
"reason":"Unsupported filetype"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
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"}```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## pasetebin.php
|
||||||
|
- URL https://pictshare.net/api/pastebin.php
|
||||||
|
- Method: POST/GET text
|
||||||
|
- Post var name: api_paste_code
|
||||||
|
- Answer: Plaintext URL to pasted bin
|
||||||
|
|
||||||
|
This API can be used to directly post text. Server responds with the URL to the bin or with an error message
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
Creating a new text bin that ready "Hello World"
|
||||||
|
|
||||||
|
```url -F "api_paste_code=Hello World" https://pictshare.net/api/pastebin.php```
|
||||||
|
|
||||||
|
Answer from the server:
|
||||||
|
```https://pictshare.net/vekjy4e5rr.txt```
|
||||||
Reference in New Issue
Block a user