Skip to content

Commit a5e22fd

Browse files
committed
Fix Documentation formating and wording
1 parent cbb8b5e commit a5e22fd

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

README.adoc

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ In this handler are the following modules in use.
1212
* github.com/caddyserver/jsonc-adapter
1313
* upload :-)
1414
15-
# config
15+
## Configuration
1616

17-
## Parameters
17+
### Parameters
1818

1919
[cols="2,6",options=header]
2020
|===
@@ -33,7 +33,7 @@ In this handler are the following modules in use.
3333
more bytes will return an error with HTTP status 413.
3434
|===
3535

36-
## JSON
36+
### JSON
3737

3838
Because I prefer the https://caddyserver.com/docs/json/[JSON Config ]
3939
will I write here the config in JSON Syntax.
@@ -55,34 +55,37 @@ will I write here the config in JSON Syntax.
5555
A full working example is in
5656
`docker-files/opt/webroot/config/Caddyfile-upload.json`
5757

58-
## Caddyfile
58+
### Caddyfile
5959

60-
Here a example Caddyfile
60+
Here a example Caddyfile which expected that he environment variable
61+
`APPORT` is set.
6162

6263
[source]
6364
----
6465
{
6566
order upload before file_server
6667
}
67-
#APPPORT set from env APPPORT=:8888
68+
6869
{$APPPORT} {
69-
root * /var/test
70+
root .
7071
71-
file_server /var/test/* {
72-
browse /var/test/upload_index.htm
73-
}
74-
@mypost method POST
72+
file_server browse
73+
templates
74+
75+
@mypost method POST
7576
upload @mypost {
76-
dest_dir /var/test/tmp_upload
77+
dest_dir tmp-upl
7778
max_filesize 4MB
79+
response_template templates/upload-resp-template.txt
7880
}
7981
8082
log {
8183
output file access.log
8284
}
8385
}
8486
----
85-
# build
87+
88+
## build
8689

8790
[source,shell]
8891
---
@@ -91,9 +94,9 @@ xcaddy build --with github.com/kirsch33/realip \
9194
--with github.com/git001/caddyv2-upload
9295
---
9396

94-
# run
97+
## run
9598

96-
## cli
99+
### cli
97100

98101
[source,shell]
99102
---
@@ -102,7 +105,7 @@ APPPORT=:2011 ./caddy run \
102105
-config Caddyfile-upload.json
103106
---
104107

105-
## docker
108+
### docker
106109

107110
You can get this image from docker hub
108111

@@ -122,7 +125,7 @@ docker run --name caddy-test --rm \
122125
docker.io/me2digital/caddyv2-upload:latest
123126
---
124127

125-
# example cli
128+
## example cli
126129

127130
When you run the Image with port 8888 can you use curl or any other
128131
tool to post (upload) files
@@ -134,7 +137,7 @@ https://daniel.haxx.se/blog/2015/09/11/unnecessary-use-of-curl-x/[UNNECESSARY US
134137
Here a example call with curl
135138

136139
[source,shell]
137-
---
140+
----
138141
curl -v --form [email protected] http://localhost:8888/templates/upload-template.html
139142
* Trying 127.0.0.1:8888...
140143
* TCP_NODELAY set

0 commit comments

Comments
 (0)