more info

This commit is contained in:
Christian Haschek
2015-10-27 22:02:30 +01:00
parent a48c3f2fd1
commit 0052728f4c

View File

@@ -1,6 +1,6 @@
# PictShare
**[Live Demo](https://www.pictshare.net)**
PictShare is an open source image hosting service with a simple resizing API that you can host yourself.
PictShare is an multi lingual, open source image hosting service with a simple resizing and upload API that you can host yourself.
![PictShare](https://www.pictshare.net/da6733407c.png)
@@ -22,13 +22,17 @@ Lets's say you have uploaded this image:
URL: ```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 edit the URL and add "/100x100/ before the image name like this: ```https://www.pictshare.net/100x100/b260e36b60.jpg```
Instead of editing the picture and re-uploading it you just edit the URL and add "/100x100/ before the image name like this: ```https://www.pictshare.net/100x100/b260e36b60.jpg```
![Smaller Venus](https://www.pictshare.net/100x100/b260e36b60.jpg)
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.
You can limit the number of resizes per image in the ```index.php``` file
## How does the API work?
### From URL
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>```.
@@ -43,6 +47,12 @@ 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"}
```
### From base64
Just send a POST request to ```https://pictshare.net/backend.php``` and send your image in base64 as the variable name ```base64```
Server will automatically try to guess the file type (which should work in 90% of the cases) and if it can't figure it out it'll just upload it as png.
## Security and privacy
- By hosting your own images you can delete them any time you want
- You can enable or disable upload logging. Don't want to know who uploaded stuff? Just change the setting in index.php
@@ -56,6 +66,8 @@ The server will answer with the file name and the server path in JSON:
## 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
- (optional) You can and should put a [nginx](https://www.nginx.com/) proxy before the Apache server. That thing is just insanely fast with static content like images.
- (optional) To secure your traffic I'd highly recommend getting an [SSL Cert](https://letsencrypt.org/) for your server if you don't already have one.
## Browser extensions
- Chrome: https://chrome.google.com/webstore/detail/pictshare-1-click-imagesc/mgomffcdpnohakmlhhjmiemlolonpafc