Mercurial > prosody-modules
comparison mod_http_upload/README.markdown @ 2702:caabb980d1d8
Merge commit
author | tmolitor <thilo@eightysoft.de> |
---|---|
date | Mon, 24 Apr 2017 20:57:23 +0200 |
parents | d0948bd96a7b |
children | d48faff92490 |
comparison
equal
deleted
inserted
replaced
2701:d96831e46b64 | 2702:caabb980d1d8 |
---|---|
25 Alternatively it can be added to `modules_enabled` like other modules. | 25 Alternatively it can be added to `modules_enabled` like other modules. |
26 | 26 |
27 Limits | 27 Limits |
28 ------ | 28 ------ |
29 | 29 |
30 ### Max size | |
31 | |
30 A maximum file size can be set by: | 32 A maximum file size can be set by: |
31 | 33 |
32 ``` {.lua} | 34 ``` {.lua} |
33 http_upload_file_size_limit = 123 -- bytes | 35 http_upload_file_size_limit = 123 -- bytes |
34 ``` | 36 ``` |
35 | 37 |
36 Default is 1MB (1024\*1024). | 38 Default is 1MB (1024\*1024). |
37 | 39 |
38 This can not be set over the value of `http_max_content_size` (default 10M). | 40 This can not be set over the value of `http_max_content_size` (default 10M). |
41 | |
42 ### Max age | |
43 | |
44 Files can be set to be deleted after some time: | |
45 | |
46 ``` lua | |
47 http_upload_expire_after = 60 * 60 * 24 * 7 -- a week in seconds | |
48 ``` | |
49 | |
50 ### User quota | |
51 | |
52 A total maximum size of all uploaded files per user can be set by: | |
53 | |
54 ``` lua | |
55 http_upload_quota = 1234 -- bytes | |
56 ``` | |
57 | |
58 ### File types | |
59 | |
60 Accepted file types can be limited by MIME type: | |
61 | |
62 ``` lua | |
63 http_upload_allowed_file_types = { "image/*", "text/plain" } | |
64 ``` | |
39 | 65 |
40 Path | 66 Path |
41 ---- | 67 ---- |
42 | 68 |
43 By default, uploaded files are put in a sub-directory of the default | 69 By default, uploaded files are put in a sub-directory of the default |