summary refs log tree commit diff
path: root/synapse/media/media_repository.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Support MSC3916 by adding a federation /thumbnail endpoint and authenticated ↵Shay2024-07-081-2/+9
| | | | | | | | | | | | | | `_matrix/client/v1/media/thumbnail` endpoint (#17388) [MSC3916](https://github.com/matrix-org/matrix-spec-proposals/pull/3916) added the endpoints `_matrix/federation/v1/media/thumbnail` and the authenticated `_matrix/client/v1/media/thumbnail`. This PR implements those endpoints, along with stabilizing `_matrix/client/v1/media/config` and `_matrix/client/v1/media/preview_url`. Complement tests are at https://github.com/matrix-org/complement/pull/728
* Support MSC3916 by adding `_matrix/client/v1/media/download` endpoint (#17365)Shay2024-07-021-3/+148
|
* Re-introduce federation /download endpoint (#17350)Shay2024-06-251-3/+11
|
* Revert "Support MSC3916 by adding a federation `/download` endpoint" (#17325)Andrew Morgan2024-06-181-14/+4
|
* Support MSC3916 by adding a federation `/download` endpoint (#17172)Shay2024-06-071-4/+14
|
* Ratelimiting of remote media downloads (#17256)Shay2024-06-051-5/+38
|
* Ensure we delete media if we reject due to spam check (#17246)Erik Johnston2024-05-301-0/+5
| | | | | | | | Fixes up #17239 We need to keep the spam check within the `try/except` block. Also makes it so that we don't enter the top span twice. Also also ensures that we get the right thumbnail length.
* Fix slipped logging context when media rejected (#17239)Erik Johnston2024-05-291-9/+2
| | | | | | | When a module rejects a piece of media we end up trying to close the same logging context twice. Instead of fixing the existing code we refactor to use an async context manager, which is easier to write correctly.
* Bump black from 23.10.1 to 24.2.0 (#16936)dependabot[bot]2024-03-131-3/+3
|
* Correctly mention previous copyright (#16820)Erik Johnston2024-01-231-0/+2
| | | | | During the migration the automated script to update the copyright headers accidentally got rid of some of the existing copyright lines. Reinstate them.
* Merge remote-tracking branch 'gitlab/clokep/license-license' into new_developErik Johnston2023-12-131-11/+16
|\
| * Update license headersPatrick Cloke2023-11-211-11/+16
| |
* | Request & follow redirects for /media/v3/download (#16701)Patrick Cloke2023-11-291-13/+4
|/ | | | | | Implement MSC3860 to follow redirects for federated media downloads. Note that the Client-Server API doesn't support this (yet) since the media repository in Synapse doesn't have a way of supporting redirects.
* Asynchronous Uploads (#15503)Sumner Evans2023-11-151-14/+206
| | | Support asynchronous uploads as defined in MSC2246.
* Return attrs for more media repo APIs. (#16611)Patrick Cloke2023-11-091-30/+40
|
* Remove more usages of cursor_to_dict. (#16551)Patrick Cloke2023-10-261-4/+1
| | | Mostly to improve type safety.
* Return ThumbnailInfo in more places (#16438)Patrick Cloke2023-10-061-0/+3
| | | | Improves type hints by using concrete types instead of dictionaries.
* Register media servlets via regex. (#16419)Patrick Cloke2023-10-061-1/+9
| | | | | This converts the media servlet URLs in the same way as (most) of the rest of Synapse. This will give more flexibility in the versions each endpoint exists under.
* Gracefully handle failing to thumbnail images (#16211)Erik Johnston2023-08-301-1/+4
|
* Add tracing to media `/upload` endpoint (#15850)Eric Eastwood2023-07-051-0/+3
| | | Add tracing instrumentation to media `/upload` code paths to investigate https://github.com/matrix-org/synapse/issues/15841
* Add config option to prevent media downloads from listed domains. (#15197)Travis Ralston2023-05-091-0/+9
| | | | | | | This stops media (and thumbnails) from being accessed from the listed domains. It does not delete any already locally cached media, but will prevent accessing it. Note that admin APIs are unaffected by this change.
* Refactor media modules. (#15146)Patrick Cloke2023-02-271-0/+1038
* Removes the `v1` directory from `test.rest.media.v1`. * Moves the non-REST code from `synapse.rest.media.v1` to `synapse.media`. * Flatten the `v1` directory from `synapse.rest.media`, but leave compatiblity with 3rd party media repositories and spam checkers.