mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-12 03:06:22 +00:00
added more documentation
This commit is contained in:
@@ -25,6 +25,7 @@ Table of contents
|
||||
|
||||
- New API system. Only single file uploads now via /api/upload.php (POST var name is "file"). [read more..](/rtfm/API.md)
|
||||
- Data directory changed from ```upload``` to ```data```
|
||||
- Backblaze support dropped for now because we didn't need it anymore as ALT_FOLDER is more flexible. If soneone needs it, it can easily be implemented via adding a new storage controller. We're happy to accept pull requests
|
||||
|
||||
## Status
|
||||
|
||||
@@ -37,6 +38,8 @@ Table of contents
|
||||
|
||||
### Config options
|
||||
|
||||
Read [here](/rftm/CONFIG.md) what those options do
|
||||
|
||||
- [x] ALT_FOLDER
|
||||
- [x] URL (instead of FORCE_DOMAIN but mandatory)
|
||||
- [x] LOG_UPLOADER
|
||||
|
||||
@@ -472,7 +472,7 @@ function storeFile($srcfile,$hash,$deleteoriginal=false)
|
||||
|
||||
if(defined('LOG_UPLOADER') && LOG_UPLOADER)
|
||||
{
|
||||
$fh = fopen(ROOT.DS.'data'.DS.'uploads.txt', 'a');
|
||||
$fh = fopen(ROOT.DS.'data'.DS.'uploads.csv', 'a');
|
||||
fwrite($fh, time().';'.$url.';'.$hash.';'.getUserIP()."\n");
|
||||
fclose($fh);
|
||||
}
|
||||
|
||||
17
rtfm/CONFIG.md
Normal file
17
rtfm/CONFIG.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Config options
|
||||
|
||||
|Option | value type | What it does|
|
||||
|--- | --- | ---|
|
||||
| URL | string | Sets the URL that will be shown to users for each upload. Must be set and must have tailing slash. eg: http://pictshare.local/ |
|
||||
| ALT_FOLDER | string | All uploaded files will be copied to this location. This location can be a mounted network share (eg NFS or FTP, etc). If a file is not found in the normal upload direcotry, ALT_FOLDER will be checked. [more info about scaling PictShare](/rtfm/SCALING.md) |
|
||||
| LOG_UPLOADER | bool | If set to true, all IP addresses of uploaders will be stored in /data/uploads.csv |
|
||||
| FFMPEG_BINARY | string | If you installed ffmpeg on your machine, you can set the binary path here. This allows devices like the Raspberry Pi to be used with PictShare although I wouldn't recommend it because of the sloooooow conversion speed |
|
||||
| PNG_COMPRESSION | int | 0 (no compression) to 9 (best compression) Note that for PNGs the compression doesn't affect the quality of the image, just the en/decode speed and file size |
|
||||
| JPEG_COMPRESSION | int | 0 (worst quality) to 100 (best quality) |
|
||||
| WEBP_COMPRESSION | int | 0 (worst quality, smallest file) to 100 (best quality, biggest file) |
|
||||
| MASTER_DELETE_CODE | string | If set, this code will be accepted to delete any image by adding "delete_yourmasterdeletecode" to any image |
|
||||
| MASTER_DELETE_IP | IP addr | If set, allows deletion of image no matter what delete code you provided if request is coming from this single IP |
|
||||
| UPLOAD_FORM_LOCATION | string | If set, will only show the upload form if this url is requested. eg if you set it to /secret/upload then you only see the form if you go to http://your.pictshare.server/secret/upload but bare in mind that the uploads [via API](/rtfm/API.md) will still work for anyone|
|
||||
| UPLOAD_QUOTA (NOT IMPLEMENTED) | int | Size in MB. If set, will only allow uploads if combined size of uploads on Server is smaller than this value. Does not account for ALT_FOLDER data and resized versions of original uploads won't be added to calculation |
|
||||
| UPLOAD_CODE (NOT IMPLEMENTED | string | If set, all uploads require this code via GET or POST variable "uploadcode" or upload will fail |
|
||||
| MAX_RESIZED_IMAGES (NOT IMPLEMENTED | string | If set, limits count of resized images/videos per file on server |
|
||||
@@ -24,6 +24,9 @@ cp -r temp/* pictshare/.
|
||||
rm -rf temp
|
||||
```
|
||||
|
||||
## Configuring PictShare
|
||||
[Documentation of config settings here](/rtfm/CONFIG.md)
|
||||
|
||||
## Nginx configuration
|
||||
This is a simple config file that should make PictShare work on nginx
|
||||
|
||||
|
||||
Reference in New Issue
Block a user