Skip to content

Commit 249d0db

Browse files
add documentation for it
1 parent 978a425 commit 249d0db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.markdown

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,16 @@ Usage
166166

167167
```lua
168168
local upload = require "resty.upload"
169-
local form, err = upload:new(self, chunk_size, max_line_size, preserve_body)
169+
local form, err = upload:new(self, chunk_size, max_line_size, preserve_body, lf_line_break)
170170
```
171171
`chunk_size` defaults to 4096. It is the size used to read data from the socket.
172172

173173
`max_line_size` defaults to 512. It is the size limit to read the chunked body header.
174174

175175
By Default, `lua-resty-upload` will consume the request body. For proxy mode this means upstream will not see the body. When `preserve_body` is set to true, the request body will be preserved. Note that this option is not free. When enabled, it will double the memory usage of `resty.upload`.
176176

177+
By Default, `lua-resty-upload` forbids using only LF(`'\n'`) as linebreak in multipart boundary. To be compatible with LF line break, set `lf_line_break` to true.
178+
177179
Author
178180
======
179181

0 commit comments

Comments
 (0)