Mercurial > prosody-modules
annotate mod_migrate_http_upload/README.markdown @ 5173:460f78654864
mod_muc_rtbl: also filter messages
This was a bit tricky because we don't want to run the JIDs
through SHA256 on each message. Took a while to come up with this
simple plan of just caching the SHA256 of the JIDs on the
occupants.
This will leave some dirt in the occupants after unloading the
module, but that should be ok; once they cycle the room, the
hashes will be gone.
This is direly needed, otherwise, there is a tight race between
the moderation activities and the actors joining the room.
author | Jonas Schäfer <jonas@wielicki.name> |
---|---|
date | Tue, 21 Feb 2023 21:37:27 +0100 |
parents | 6844733ad2f5 |
children |
rev | line source |
---|---|
4468
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 --- |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 summary: mod_http_upload to mod_http_file_share migrator |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 labels: |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 - Stage-Alpha |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
5 --- |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
7 |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
8 This is a migration script for converting records of [mod_http_upload] |
4469
6844733ad2f5
mod_migrate_http_upload: Fix autolink in README
Kim Alvefur <zash@zash.se>
parents:
4468
diff
changeset
|
9 into the format used by the new [mod_http_file_share][doc:modules:mod_http_file_share] |
6844733ad2f5
mod_migrate_http_upload: Fix autolink in README
Kim Alvefur <zash@zash.se>
parents:
4468
diff
changeset
|
10 which will be available with Prosody 0.12 (currently in trunk). |
4468
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
11 |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
12 # Usage |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
13 |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
14 If your main `VirtualHost` is called "example.com" and your HTTP upload |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
15 `Component` is called "upload.example.com", then this command would |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
16 convert records of existing uploads via [mod_http_upload] to |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
17 [mod_http_file_share][doc:modules:mod_http_file_share]: |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
18 |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
19 ```bash |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
20 sudo prosodyctl mod_migrate_http_upload upload.example.com example.com |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
21 ``` |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
22 |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
23 In order to preserve URLs you will need to configure the |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
24 [path][doc:http#path_configuration] to be the same as mod_http_upload: |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
25 |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
26 ```lua |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
27 Component "upload.example.com" "http_file_share" |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
28 http_paths = { |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
29 file_share = "/upload" |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
30 } |
5d8f9cc5c6fb
mod_migrate_http_upload: Upload data converter to mod_http_file_share
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
31 ``` |