author | Kim Alvefur <zash@zash.se> |
Wed, 24 Feb 2016 15:58:49 +0100 | |
changeset 2056 | ad2966b932ed |
parent 1971 | 2ce2b194d501 |
child 2057 | 40056a27f394 |
permissions | -rw-r--r-- |
1917
188c38c1a711
mod_http_upload/README: Update with XEP reference, stage, description
Kim Alvefur <zash@zash.se>
parents:
1866
diff
changeset
|
1 |
--- |
188c38c1a711
mod_http_upload/README: Update with XEP reference, stage, description
Kim Alvefur <zash@zash.se>
parents:
1866
diff
changeset
|
2 |
labels: Stage-Alpha |
188c38c1a711
mod_http_upload/README: Update with XEP reference, stage, description
Kim Alvefur <zash@zash.se>
parents:
1866
diff
changeset
|
3 |
description: HTTP File Upload |
188c38c1a711
mod_http_upload/README: Update with XEP reference, stage, description
Kim Alvefur <zash@zash.se>
parents:
1866
diff
changeset
|
4 |
... |
188c38c1a711
mod_http_upload/README: Update with XEP reference, stage, description
Kim Alvefur <zash@zash.se>
parents:
1866
diff
changeset
|
5 |
|
1820 | 6 |
Introduction |
7 |
============ |
|
8 |
||
1917
188c38c1a711
mod_http_upload/README: Update with XEP reference, stage, description
Kim Alvefur <zash@zash.se>
parents:
1866
diff
changeset
|
9 |
This module implements [XEP-0363], which lets clients upload files over |
188c38c1a711
mod_http_upload/README: Update with XEP reference, stage, description
Kim Alvefur <zash@zash.se>
parents:
1866
diff
changeset
|
10 |
HTTP. |
1820 | 11 |
|
12 |
Configuration |
|
13 |
============= |
|
14 |
||
1844
3bd265f7a95f
mod_http_upload/README: Point to Prosodys HTTP docs
Kim Alvefur <zash@zash.se>
parents:
1820
diff
changeset
|
15 |
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
|
16 |
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
|
17 |
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
|
18 |
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
|
19 |
|
1864
8e5ee3b09e9d
mod_http_upload/README: Reorder text and mention what the examples are
Kim Alvefur <zash@zash.se>
parents:
1855
diff
changeset
|
20 |
The module can either be configured as a component or added to an |
1866
3aabb670239d
mod_http_upload/README: Fix typo (thanks you-know-who-you-are)
Kim Alvefur <zash@zash.se>
parents:
1865
diff
changeset
|
21 |
existing host or component. Possible configuration variants are as |
1864
8e5ee3b09e9d
mod_http_upload/README: Reorder text and mention what the examples are
Kim Alvefur <zash@zash.se>
parents:
1855
diff
changeset
|
22 |
follows: |
8e5ee3b09e9d
mod_http_upload/README: Reorder text and mention what the examples are
Kim Alvefur <zash@zash.se>
parents:
1855
diff
changeset
|
23 |
|
1820 | 24 |
Component |
25 |
--------- |
|
26 |
||
1865
385f67111d22
mod_http_upload/README: More explaining text
Kim Alvefur <zash@zash.se>
parents:
1864
diff
changeset
|
27 |
You can configure it as a standalone component: |
1820 | 28 |
|
29 |
Component "upload.example.org" "http_upload" |
|
30 |
||
31 |
Existing component |
|
32 |
------------------ |
|
33 |
||
1865
385f67111d22
mod_http_upload/README: More explaining text
Kim Alvefur <zash@zash.se>
parents:
1864
diff
changeset
|
34 |
Or add it to an existing component: |
385f67111d22
mod_http_upload/README: More explaining text
Kim Alvefur <zash@zash.se>
parents:
1864
diff
changeset
|
35 |
|
1820 | 36 |
Component "proxy.example.org" "proxy65" |
37 |
modules_enabled = { |
|
38 |
"http_upload"; |
|
39 |
} |
|
40 |
||
41 |
On VirtualHosts |
|
42 |
--------------- |
|
43 |
||
1865
385f67111d22
mod_http_upload/README: More explaining text
Kim Alvefur <zash@zash.se>
parents:
1864
diff
changeset
|
44 |
Or load it directly on hosts: |
385f67111d22
mod_http_upload/README: More explaining text
Kim Alvefur <zash@zash.se>
parents:
1864
diff
changeset
|
45 |
|
1820 | 46 |
-- In the Global section or under a specific VirtualHosts line |
47 |
modules_enabled = { |
|
48 |
-- other modules |
|
49 |
"http_upload"; |
|
50 |
} |
|
1851
cd98a1103ecf
mod_http_upload/README: Say it works with 0.9+
Kim Alvefur <zash@zash.se>
parents:
1844
diff
changeset
|
51 |
|
1855
03c5639882a7
mod_http_upload: Add support for a file size limit
Kim Alvefur <zash@zash.se>
parents:
1851
diff
changeset
|
52 |
Limits |
03c5639882a7
mod_http_upload: Add support for a file size limit
Kim Alvefur <zash@zash.se>
parents:
1851
diff
changeset
|
53 |
------ |
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 |
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
|
56 |
|
03c5639882a7
mod_http_upload: Add support for a file size limit
Kim Alvefur <zash@zash.se>
parents:
1851
diff
changeset
|
57 |
``` {.lua} |
2056
ad2966b932ed
mod_http_upload/README: Mention default upload size limit and change example to something that nobody should copy
Kim Alvefur <zash@zash.se>
parents:
1971
diff
changeset
|
58 |
http_upload_file_size_limit = 123 -- bytes |
1855
03c5639882a7
mod_http_upload: Add support for a file size limit
Kim Alvefur <zash@zash.se>
parents:
1851
diff
changeset
|
59 |
``` |
03c5639882a7
mod_http_upload: Add support for a file size limit
Kim Alvefur <zash@zash.se>
parents:
1851
diff
changeset
|
60 |
|
2056
ad2966b932ed
mod_http_upload/README: Mention default upload size limit and change example to something that nobody should copy
Kim Alvefur <zash@zash.se>
parents:
1971
diff
changeset
|
61 |
Default is 10MB (10*1024*1024). |
ad2966b932ed
mod_http_upload/README: Mention default upload size limit and change example to something that nobody should copy
Kim Alvefur <zash@zash.se>
parents:
1971
diff
changeset
|
62 |
|
1971
2ce2b194d501
mod_http_upload: Make file system path configurable
Kim Alvefur <zash@zash.se>
parents:
1917
diff
changeset
|
63 |
Path |
2ce2b194d501
mod_http_upload: Make file system path configurable
Kim Alvefur <zash@zash.se>
parents:
1917
diff
changeset
|
64 |
---- |
2ce2b194d501
mod_http_upload: Make file system path configurable
Kim Alvefur <zash@zash.se>
parents:
1917
diff
changeset
|
65 |
|
2ce2b194d501
mod_http_upload: Make file system path configurable
Kim Alvefur <zash@zash.se>
parents:
1917
diff
changeset
|
66 |
By default, uploaded files are put in a sub-directory of the default |
2ce2b194d501
mod_http_upload: Make file system path configurable
Kim Alvefur <zash@zash.se>
parents:
1917
diff
changeset
|
67 |
Prosody storage path (usually `/var/lib/prosody`). This can be changed: |
2ce2b194d501
mod_http_upload: Make file system path configurable
Kim Alvefur <zash@zash.se>
parents:
1917
diff
changeset
|
68 |
|
2ce2b194d501
mod_http_upload: Make file system path configurable
Kim Alvefur <zash@zash.se>
parents:
1917
diff
changeset
|
69 |
``` {.lua} |
2ce2b194d501
mod_http_upload: Make file system path configurable
Kim Alvefur <zash@zash.se>
parents:
1917
diff
changeset
|
70 |
http_upload_path = "/path/to/uploded/files" |
2ce2b194d501
mod_http_upload: Make file system path configurable
Kim Alvefur <zash@zash.se>
parents:
1917
diff
changeset
|
71 |
``` |
2ce2b194d501
mod_http_upload: Make file system path configurable
Kim Alvefur <zash@zash.se>
parents:
1917
diff
changeset
|
72 |
|
1851
cd98a1103ecf
mod_http_upload/README: Say it works with 0.9+
Kim Alvefur <zash@zash.se>
parents:
1844
diff
changeset
|
73 |
Compatibility |
cd98a1103ecf
mod_http_upload/README: Say it works with 0.9+
Kim Alvefur <zash@zash.se>
parents:
1844
diff
changeset
|
74 |
============= |
cd98a1103ecf
mod_http_upload/README: Say it works with 0.9+
Kim Alvefur <zash@zash.se>
parents:
1844
diff
changeset
|
75 |
|
cd98a1103ecf
mod_http_upload/README: Say it works with 0.9+
Kim Alvefur <zash@zash.se>
parents:
1844
diff
changeset
|
76 |
Works with Prosody 0.9.x and later. |