Init commit
25
README.md
Executable file → Normal file
@@ -6,7 +6,7 @@ If you own a server (even an home server) you can host your own PictShare instan
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
- Uploads without logins or validation (that's a good thing, right?)
|
- Uploads without logins or validation (that's a good thing, right?)
|
||||||
- Simple API to upload any image from remote servers to your instance via URL or base64 encoded image
|
- Simple API to upload any image from remote servers to your instance via URL
|
||||||
- 100% file based - no database needed
|
- 100% file based - no database needed
|
||||||
- PictShare removes all exif data so you can upload photos from your phone and all GPS tags and camera model info get wiped
|
- PictShare removes all exif data so you can upload photos from your phone and all GPS tags and camera model info get wiped
|
||||||
- Builtin and simple resizing and caching
|
- Builtin and simple resizing and caching
|
||||||
@@ -16,7 +16,22 @@ If you own a server (even an home server) you can host your own PictShare instan
|
|||||||
Lets's say you have uploaded this image: ```https://www.pictshare.net/b260e36b60.jpg``` but you want to use it as your avatar in some forum that only allows 100x100 pixel images.
|
Lets's say you have uploaded this image: ```https://www.pictshare.net/b260e36b60.jpg``` but you want to use it as your avatar in some forum that only allows 100x100 pixel images.
|
||||||
Instead of editing it yourself you just use ```https://www.pictshare.net/100x100/b260e36b60.jpg```
|
Instead of editing it yourself you just use ```https://www.pictshare.net/100x100/b260e36b60.jpg```
|
||||||
|
|
||||||
Just by editing the URL the image gets resized and the resized version gets cached to the disk so it loads much faster.
|
Just by editing the URL and adding the size (in width**x**height) the image gets resized and the resized version gets cached to the disk so it loads much faster on the next request.
|
||||||
|
|
||||||
|
## How does the API work?
|
||||||
|
PictShare has a simple REST API to upload remote pictures. The API can be accessed via the backend.php file like this:
|
||||||
|
|
||||||
|
```https://pictshare.net/backend.php?getimage=<URL of the image you want to upload>```.
|
||||||
|
|
||||||
|
#### Example:
|
||||||
|
|
||||||
|
Request: ```https://pictshare.net/backend.php?getimage=https://www.0xf.at/css/imgs/logo.png```
|
||||||
|
|
||||||
|
The server will answer with the file name and the server path in JSON:
|
||||||
|
|
||||||
|
```
|
||||||
|
{"status":"OK","type":"png","hash":"10ba188162.png","url":"http:\/\/pictshare.net\/10ba188162.png"}
|
||||||
|
```
|
||||||
|
|
||||||
## Security and privacy
|
## Security and privacy
|
||||||
- By hosting your own images you can delete them any time you want
|
- By hosting your own images you can delete them any time you want
|
||||||
@@ -28,5 +43,9 @@ Just by editing the URL the image gets resized and the resized version gets cach
|
|||||||
- PHP 5 GD library
|
- PHP 5 GD library
|
||||||
- Some hostname or subdomain. Site might get messed up if it's not stored in the root directory of the webserver
|
- Some hostname or subdomain. Site might get messed up if it's not stored in the root directory of the webserver
|
||||||
|
|
||||||
|
## Installing PictShare
|
||||||
|
- Just unpack it on your webserver (remember, pictshare needs to be in a root directory) and it should work out of the box
|
||||||
|
|
||||||
## Coming soon
|
## Coming soon
|
||||||
- Restricted uploads so you can control who may upload on your instance
|
- Restricted uploads so you can control who may upload on your instance
|
||||||
|
- API upload via Base64 encoded images
|
||||||
0
backend.php
Executable file → Normal file
0
classes/easyphpthumbnail.php
Executable file → Normal file
0
classes/html.php
Executable file → Normal file
0
classes/image.php
Executable file → Normal file
0
classes/model.php
Executable file → Normal file
0
classes/simpleimage.php
Executable file → Normal file
0
css/imgs/Thumbs.db
Executable file → Normal file
0
css/imgs/bg.png
Executable file → Normal file
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
0
css/imgs/content.png
Executable file → Normal file
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
0
css/imgs/footer.png
Executable file → Normal file
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
0
css/imgs/header.png
Executable file → Normal file
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
0
css/imgs/header_empty.png
Executable file → Normal file
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
0
css/imgs/header_logo.png
Executable file → Normal file
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
0
css/imgs/hs_logo.png
Executable file → Normal file
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |