author | Kim Alvefur <zash@zash.se> |
Thu, 17 Sep 2015 20:16:09 +0200 | |
changeset 1865 | 385f67111d22 |
parent 1864 | 8e5ee3b09e9d |
child 1866 | 3aabb670239d |
permissions | -rw-r--r-- |
1820 | 1 |
Introduction |
2 |
============ |
|
3 |
||
4 |
This module provides a space for clients to upload files over HTTP, as |
|
5 |
used by [Conversations](http://conversations.im/). |
|
6 |
||
7 |
Configuration |
|
8 |
============= |
|
9 |
||
1844
3bd265f7a95f
mod_http_upload/README: Point to Prosodys HTTP docs
Kim Alvefur <zash@zash.se>
parents:
1820
diff
changeset
|
10 |
mod\_http\_upload relies on Prosodys HTTP server and mod\_http for |
3bd265f7a95f
mod_http_upload/README: Point to Prosodys HTTP docs
Kim Alvefur <zash@zash.se>
parents:
1820
diff
changeset
|
11 |
serving HTTP requests. See [Prosodys HTTP server |
3bd265f7a95f
mod_http_upload/README: Point to Prosodys HTTP docs
Kim Alvefur <zash@zash.se>
parents:
1820
diff
changeset
|
12 |
documentation](https://prosody.im/doc/http) for information about how to |
3bd265f7a95f
mod_http_upload/README: Point to Prosodys HTTP docs
Kim Alvefur <zash@zash.se>
parents:
1820
diff
changeset
|
13 |
configure ports, HTTP Host names etc. |
3bd265f7a95f
mod_http_upload/README: Point to Prosodys HTTP docs
Kim Alvefur <zash@zash.se>
parents:
1820
diff
changeset
|
14 |
|
1864
8e5ee3b09e9d
mod_http_upload/README: Reorder text and mention what the examples are
Kim Alvefur <zash@zash.se>
parents:
1855
diff
changeset
|
15 |
The module can either be configured as a component or added to an |
8e5ee3b09e9d
mod_http_upload/README: Reorder text and mention what the examples are
Kim Alvefur <zash@zash.se>
parents:
1855
diff
changeset
|
16 |
existing host or component. Possible configurration variants are as |
8e5ee3b09e9d
mod_http_upload/README: Reorder text and mention what the examples are
Kim Alvefur <zash@zash.se>
parents:
1855
diff
changeset
|
17 |
follows: |
8e5ee3b09e9d
mod_http_upload/README: Reorder text and mention what the examples are
Kim Alvefur <zash@zash.se>
parents:
1855
diff
changeset
|
18 |
|
1820 | 19 |
Component |
20 |
--------- |
|
21 |
||
1865
385f67111d22
mod_http_upload/README: More explaining text
Kim Alvefur <zash@zash.se>
parents:
1864
diff
changeset
|
22 |
You can configure it as a standalone component: |
1820 | 23 |
|
24 |
Component "upload.example.org" "http_upload" |
|
25 |
||
26 |
Existing component |
|
27 |
------------------ |
|
28 |
||
1865
385f67111d22
mod_http_upload/README: More explaining text
Kim Alvefur <zash@zash.se>
parents:
1864
diff
changeset
|
29 |
Or add it to an existing component: |
385f67111d22
mod_http_upload/README: More explaining text
Kim Alvefur <zash@zash.se>
parents:
1864
diff
changeset
|
30 |
|
1820 | 31 |
Component "proxy.example.org" "proxy65" |
32 |
modules_enabled = { |
|
33 |
"http_upload"; |
|
34 |
} |
|
35 |
||
36 |
On VirtualHosts |
|
37 |
--------------- |
|
38 |
||
1865
385f67111d22
mod_http_upload/README: More explaining text
Kim Alvefur <zash@zash.se>
parents:
1864
diff
changeset
|
39 |
Or load it directly on hosts: |
385f67111d22
mod_http_upload/README: More explaining text
Kim Alvefur <zash@zash.se>
parents:
1864
diff
changeset
|
40 |
|
1820 | 41 |
-- In the Global section or under a specific VirtualHosts line |
42 |
modules_enabled = { |
|
43 |
-- other modules |
|
44 |
"http_upload"; |
|
45 |
} |
|
1851
cd98a1103ecf
mod_http_upload/README: Say it works with 0.9+
Kim Alvefur <zash@zash.se>
parents:
1844
diff
changeset
|
46 |
|
1855
03c5639882a7
mod_http_upload: Add support for a file size limit
Kim Alvefur <zash@zash.se>
parents:
1851
diff
changeset
|
47 |
Limits |
03c5639882a7
mod_http_upload: Add support for a file size limit
Kim Alvefur <zash@zash.se>
parents:
1851
diff
changeset
|
48 |
------ |
03c5639882a7
mod_http_upload: Add support for a file size limit
Kim Alvefur <zash@zash.se>
parents:
1851
diff
changeset
|
49 |
|
03c5639882a7
mod_http_upload: Add support for a file size limit
Kim Alvefur <zash@zash.se>
parents:
1851
diff
changeset
|
50 |
A maximum file size can be set by: |
03c5639882a7
mod_http_upload: Add support for a file size limit
Kim Alvefur <zash@zash.se>
parents:
1851
diff
changeset
|
51 |
|
03c5639882a7
mod_http_upload: Add support for a file size limit
Kim Alvefur <zash@zash.se>
parents:
1851
diff
changeset
|
52 |
``` {.lua} |
03c5639882a7
mod_http_upload: Add support for a file size limit
Kim Alvefur <zash@zash.se>
parents:
1851
diff
changeset
|
53 |
http_upload_file_size_limit = 10 * 1024 * 1024 -- this is 10MB in bytes |
03c5639882a7
mod_http_upload: Add support for a file size limit
Kim Alvefur <zash@zash.se>
parents:
1851
diff
changeset
|
54 |
``` |
03c5639882a7
mod_http_upload: Add support for a file size limit
Kim Alvefur <zash@zash.se>
parents:
1851
diff
changeset
|
55 |
|
1851
cd98a1103ecf
mod_http_upload/README: Say it works with 0.9+
Kim Alvefur <zash@zash.se>
parents:
1844
diff
changeset
|
56 |
Compatibility |
cd98a1103ecf
mod_http_upload/README: Say it works with 0.9+
Kim Alvefur <zash@zash.se>
parents:
1844
diff
changeset
|
57 |
============= |
cd98a1103ecf
mod_http_upload/README: Say it works with 0.9+
Kim Alvefur <zash@zash.se>
parents:
1844
diff
changeset
|
58 |
|
cd98a1103ecf
mod_http_upload/README: Say it works with 0.9+
Kim Alvefur <zash@zash.se>
parents:
1844
diff
changeset
|
59 |
Works with Prosody 0.9.x and later. |