mirror of
https://github.com/SaraSmiseth/prosody.git
synced 2025-01-18 13:10:37 +00:00
Switched from [http_upload](https://modules.prosody.im/mod_http_upload) to [http_file_share](https://prosody.im/doc/modules/mod_http_file_share). (#60)
This commit is contained in:
parent
f8d0fe4f59
commit
fe1787f93c
5 changed files with 23 additions and 8 deletions
15
CHANGELOG.md
15
CHANGELOG.md
|
@ -2,10 +2,23 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
## v1.2.11
|
||||
## v1.3.0
|
||||
|
||||
* Updated to Prosody version [0.12.4](https://blog.prosody.im/prosody-0.12.4-released/)
|
||||
|
||||
### Breaking Change
|
||||
|
||||
Switched from [http_upload](https://modules.prosody.im/mod_http_upload) to [http_file_share](https://prosody.im/doc/modules/mod_http_file_share).
|
||||
This means that previous uploads will NOT work after upgrading.
|
||||
ENV variable `HTTP_UPLOAD_FILE_SIZE_LIMIT` was removed.
|
||||
|
||||
The new module uses the following variables:
|
||||
|
||||
* HTTP_FILE_SHARE_SIZE_LIMIT
|
||||
* HTTP_FILE_SHARE_DAILY_QUOTA
|
||||
|
||||
See [readme.md](readme.md) for explanations and defaults.
|
||||
|
||||
## v1.2.10
|
||||
|
||||
* Update docker base image to debian bookworm
|
||||
|
|
|
@ -107,7 +107,6 @@ RUN download-prosody-modules.bash \
|
|||
filter_chatstates `# disable "X is typing" type messages` \
|
||||
smacks `# stream management (XEP-0198)` \
|
||||
throttle_presence `# presence throttling in CSI` \
|
||||
http_upload `# file sharing (XEP-0363)` \
|
||||
vcard_muc `# XEP-0153: vCard-Based Avatar (MUC)` \
|
||||
&& rm -rf "/usr/src/prosody-modules"
|
||||
|
||||
|
|
|
@ -25,9 +25,11 @@ disco_items = {
|
|||
}
|
||||
|
||||
-- Set up a http file upload because proxy65 is not working in muc
|
||||
Component (domain_http_upload) "http_upload"
|
||||
http_upload_expire_after = 60 * 60 * 24 * 7 -- a week in seconds
|
||||
http_upload_file_size_limit = os.getenv("HTTP_UPLOAD_FILE_SIZE_LIMIT") or 1024 * 1024 -- Default is 1MB
|
||||
Component (domain_http_upload) "http_file_share"
|
||||
http_file_share_expires_after = 60 * 60 * 24 * 7 -- a week in seconds
|
||||
local size_limit = os.getenv("HTTP_FILE_SHARE_SIZE_LIMIT") or 10 * 1024 * 1024 -- Default is 10MB
|
||||
http_file_share_size_limit = size_limit
|
||||
http_file_share_daily_quota = os.getenv("HTTP_FILE_SHARE_DAILY_QUOTA") or 10 * size_limit -- Default is 10x the size limit
|
||||
|
||||
Component (domain_muc) "muc"
|
||||
name = "Prosody Chatrooms"
|
||||
|
|
|
@ -222,7 +222,8 @@ sudo chown 999:999 ./data
|
|||
| **DB_USERNAME** | The username to authenticate to the database | *optional* | |
|
||||
| **DB_PASSWORD** | The password to authenticate to the database | *optional* | |
|
||||
| **HTTP_MAX_CONTENT_SIZE** | Max http content size in bytes | *optional* | 10485760 |
|
||||
| **HTTP_UPLOAD_FILE_SIZE_LIMIT** | Max upload file size. Can not be larger than HTTP_MAX_CONTENT_SIZE | *optional* | 1048576 |
|
||||
| **HTTP_FILE_SHARE_SIZE_LIMIT** | Max http file share size in bytes | *optional* | 10485760 |
|
||||
| **HTTP_FILE_SHARE_DAILY_QUOTA** | Daily quota in bytes | *optional* | 10 times share size limit |
|
||||
| **E2E_POLICY_CHAT** | Policy for chat messages. Possible values: "none", "optional" and "required". | *optional* | "required" |
|
||||
| **E2E_POLICY_MUC** | Policy for MUC messages. Possible values: "none", "optional" and "required". | *optional* | "required" |
|
||||
| **E2E_POLICY_WHITELIST** | Make this module ignore messages sent to and from this JIDs or MUCs. | *optional* | "" |
|
||||
|
|
|
@ -82,7 +82,7 @@ load 'bats/bats-assert/load'
|
|||
}
|
||||
|
||||
@test "Should show upload URL" {
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep \"URL: <https:\/\/upload.example.com:5281\/upload> - Ensure this can be reached by users\""
|
||||
run bash -c "sudo docker-compose logs $batsContainerName | grep \"Serving 'file_share' at https:\/\/upload.example.com:5281\/file_share\""
|
||||
assert_success
|
||||
assert_output
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue