From c1471d9902fc816812fd421ef376054ce3b92ea9 Mon Sep 17 00:00:00 2001 From: dklimpel <5740567+dklimpel@users.noreply.github.com> Date: Mon, 31 Jan 2022 08:50:16 +0100 Subject: [PATCH 1/5] Clarify that users' media are also preview images --- docs/admin_api/media_admin_api.md | 3 +++ docs/admin_api/user_admin_api.md | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/admin_api/media_admin_api.md b/docs/admin_api/media_admin_api.md index 60b8bc7379a2..940bb1014a8a 100644 --- a/docs/admin_api/media_admin_api.md +++ b/docs/admin_api/media_admin_api.md @@ -19,6 +19,9 @@ These APIs allow extracting media information from the homeserver. +Details about the format of the `media_id` and storage of the media in the file system +are documented in the section about the [media repository](../media_repository.md). + ## List all media in a room This API gets a list of known media in a room. diff --git a/docs/admin_api/user_admin_api.md b/docs/admin_api/user_admin_api.md index fdc1f2d1cfd1..75f2a477e346 100644 --- a/docs/admin_api/user_admin_api.md +++ b/docs/admin_api/user_admin_api.md @@ -564,6 +564,11 @@ The following fields are returned in the JSON response body: ### List media uploaded by a user Gets a list of all local media that a specific `user_id` has created. +These are media that the user has uploaded himself +([local media](../media_repository.md#local-media)), as well as +[preview images](../media_repository.md#url-previews) if the +[feature is enabled](../development/url_previews.md). + By default, the response is ordered by descending creation date and ascending media ID. The newest media is on top. You can change the order with parameters `order_by` and `dir`. @@ -663,7 +668,9 @@ The following fields are returned in the JSON response body: Media objects contain the following fields: - `created_ts` - integer - Timestamp when the content was uploaded in ms. - `last_access_ts` - integer - Timestamp when the content was last accessed in ms. - - `media_id` - string - The id used to refer to the media. + - `media_id` - string - The id used to refer to the media. Details about the format + of the `media_id` are documented in the section about the + [media repository](../media_repository.md). - `media_length` - integer - Length of the media in bytes. - `media_type` - string - The MIME-type of the media. - `quarantined_by` - string - The user ID that initiated the quarantine request From e4524f5e82dcb2719f10052819d0be635adfef56 Mon Sep 17 00:00:00 2001 From: dklimpel <5740567+dklimpel@users.noreply.github.com> Date: Mon, 31 Jan 2022 11:19:52 +0100 Subject: [PATCH 2/5] newsfile --- changelog.d/11862.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/11862.doc diff --git a/changelog.d/11862.doc b/changelog.d/11862.doc new file mode 100644 index 000000000000..ba2f3acb1459 --- /dev/null +++ b/changelog.d/11862.doc @@ -0,0 +1 @@ +Clarify that users' media are also preview images. \ No newline at end of file From 1dcded754717fad248bfdca48dfd612759bff44d Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Mon, 31 Jan 2022 15:41:43 +0100 Subject: [PATCH 3/5] Apply suggestions from code review Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> --- docs/admin_api/media_admin_api.md | 2 +- docs/admin_api/user_admin_api.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/admin_api/media_admin_api.md b/docs/admin_api/media_admin_api.md index 940bb1014a8a..448dbb1b3dee 100644 --- a/docs/admin_api/media_admin_api.md +++ b/docs/admin_api/media_admin_api.md @@ -20,7 +20,7 @@ These APIs allow extracting media information from the homeserver. Details about the format of the `media_id` and storage of the media in the file system -are documented in the section about the [media repository](../media_repository.md). +are documented under [media repository](../media_repository.md). ## List all media in a room diff --git a/docs/admin_api/user_admin_api.md b/docs/admin_api/user_admin_api.md index 75f2a477e346..de7203b0c9c7 100644 --- a/docs/admin_api/user_admin_api.md +++ b/docs/admin_api/user_admin_api.md @@ -564,9 +564,9 @@ The following fields are returned in the JSON response body: ### List media uploaded by a user Gets a list of all local media that a specific `user_id` has created. -These are media that the user has uploaded himself +These are media that the user has uploaded themselves ([local media](../media_repository.md#local-media)), as well as -[preview images](../media_repository.md#url-previews) if the +[URL preview images](../media_repository.md#url-previews) requested by the user if the [feature is enabled](../development/url_previews.md). By default, the response is ordered by descending creation date and ascending media ID. @@ -669,7 +669,7 @@ The following fields are returned in the JSON response body: - `created_ts` - integer - Timestamp when the content was uploaded in ms. - `last_access_ts` - integer - Timestamp when the content was last accessed in ms. - `media_id` - string - The id used to refer to the media. Details about the format - of the `media_id` are documented in the section about the + of the `media_id` are documented under [media repository](../media_repository.md). - `media_length` - integer - Length of the media in bytes. - `media_type` - string - The MIME-type of the media. From 16c5d65480c5d11396ee87a5922fb3bfac8df763 Mon Sep 17 00:00:00 2001 From: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Date: Mon, 31 Jan 2022 15:42:43 +0100 Subject: [PATCH 4/5] Update 11862.doc --- changelog.d/11862.doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/11862.doc b/changelog.d/11862.doc index ba2f3acb1459..98e32e7325bd 100644 --- a/changelog.d/11862.doc +++ b/changelog.d/11862.doc @@ -1 +1 @@ -Clarify that users' media are also preview images. \ No newline at end of file +Document images returned by the User List Media Admin API can include those generated by URL previews. From 46b7884168b503c70b568c1e48f805c0663442d0 Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Fri, 4 Feb 2022 14:11:39 +0000 Subject: [PATCH 5/5] Update docs/admin_api/user_admin_api.md --- docs/admin_api/user_admin_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/admin_api/user_admin_api.md b/docs/admin_api/user_admin_api.md index ffa2e5337034..b992b1c3095e 100644 --- a/docs/admin_api/user_admin_api.md +++ b/docs/admin_api/user_admin_api.md @@ -641,7 +641,7 @@ The following fields are returned in the JSON response body: - `created_ts` - integer - Timestamp when the content was uploaded in ms. - `last_access_ts` - integer - Timestamp when the content was last accessed in ms. - `media_id` - string - The id used to refer to the media. Details about the format - of the `media_id` are documented under + are documented under [media repository](../media_repository.md). - `media_length` - integer - Length of the media in bytes. - `media_type` - string - The MIME-type of the media.