arnaucube
arnaucube/goImgServerPublic Self-hosted repository
goImgServer/README.md
README.mdRaw
 1# goImgServer
 2Server of images, written in Go lang
 3
 4This is a server to post images and serve images.
 5File type accepted:
 6```
 7- PNG
 8- JPG
 9- JPEG
10```
11All the files are converted to PNG, and resized to the configured sizes.
12
13## Use
14upload example (with curl):
15```
16curl -F file=@./image1.png http://127.0.0.1:3050/image
17```
18
19to get image:
20```
21http://127.0.0.1:3050/images/image1.png
22```
23
24## Configuration
25Example configuration file (config.json):
26```
27{
28    "folder": "files",
29    "blockedIPs": [
30        "192.168.1.3",
31        "147.116.48.158"
32    ],
33    "allowedIPs": [
34        "127.0.0.1"
35    ],
36    "imgWidth": 200,
37    "imgHeigh": 0
38}
39```
40The "allowedIPs" are the IPs allowed to post images.
41
42"blockedIPs" are the IPs blocked from posting images.
43
44Also, all IPs not present in the "allowedIPs", will be blocked.