Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Support rendering some media downloads as inline (#15988) | Will Hunt | 2023-09-29 | 1 | -2/+40 |
| | | | | | Use an `inline` Content-Disposition header when the media is "safe" to display inline (some known text, image, video, audio formats). | ||||
* | Update ruff config (#16283) | Patrick Cloke | 2023-09-08 | 1 | -3/+1 |
| | | | Enable additional checks & clean-up unneeded configuration. | ||||
* | Gracefully handle failing to thumbnail images (#16211) | Erik Johnston | 2023-08-30 | 1 | -1/+4 |
| | |||||
* | Bump ruff from 0.0.277 to 0.0.286 (#16198) | dependabot[bot] | 2023-08-29 | 2 | -2/+2 |
| | | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | ||||
* | Make the media `/upload` tracing less ambiguous (#15888) | Eric Eastwood | 2023-07-10 | 2 | -42/+61 |
| | | | | | | | | | | A lot of the functions have the same name in this space like `store_file`, and we also do it multiple times for different reasons (main media repo, other storage providers, thumbnails, etc) so it's good to differentiate them so your head doesn't explode. Follow-up to https://github.com/matrix-org/synapse/pull/15850 Tracing instrumentation to media `/upload` code paths to investigate https://github.com/matrix-org/synapse/issues/15841 | ||||
* | Add tracing to media `/upload` endpoint (#15850) | Eric Eastwood | 2023-07-05 | 4 | -0/+20 |
| | | | Add tracing instrumentation to media `/upload` code paths to investigate https://github.com/matrix-org/synapse/issues/15841 | ||||
* | use Image.LANCZOS instead of Image.ANTIALIAS for thumbnail resize (#15876) | an0nfunc | 2023-07-05 | 1 | -1/+1 |
| | | | | | Image.ANTIALIAS is not defined in current pillow releases. Since ANTIALIAS was just using LANCZOS anyways, this is just a cosmetic change, but makes synapse work with most recent pillow releases. Signed-off-by: Giovanni Harting <539@idlegandalf.com> | ||||
* | Fix unsafe hotserving behaviour for non-multimedia uploads. (#15680) | Josh Qou | 2023-06-15 | 1 | -3/+12 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix unsafe hotserving behaviour for non-multimedia uploads. * invert disposition assert * test_media_storage.py: run lint * test_base.py: /inline/attachment/s * Only return attachment for disposition type, update tests * Update synapse/media/_base.py Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> * Update changelog.d/15680.bugfix Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> * add attribution * Update changelog. --------- Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> | ||||
* | Add stubs package for lxml. (#15697) | Patrick Cloke | 2023-05-31 | 2 | -36/+75 |
| | | | | | | | The stubs have some issues so this has some generous cast and ignores in it, but it is better than not having stubs. Note that confusing that Element is a function which creates _Element instances (and similarly for Comment). | ||||
* | Rename blacklist/whitelist internally. (#15620) | Patrick Cloke | 2023-05-19 | 1 | -8/+8 |
| | | | | Avoid renaming configuration settings for now and rename internal code to use blocklist and allowlist instead. | ||||
* | Apply url_preview_url_blacklist to oEmbed and pre-cached images (#15601) | Patrick Cloke | 2023-05-16 | 1 | -46/+75 |
| | | | | | | | | There are two situations which were previously not properly checked: 1. If the requested URL was replaced with an oEmbed URL, then the oEmbed URL was not checked against url_preview_url_blacklist. 2. Follow-up URLs (either via autodiscovery of oEmbed or to pre-cache images) were not checked against url_preview_url_blacklist. | ||||
* | Add config option to prevent media downloads from listed domains. (#15197) | Travis Ralston | 2023-05-09 | 1 | -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. | ||||
* | Move Spam Checker callbacks to a dedicated file (#15453) | Andrew Morgan | 2023-04-18 | 1 | -4/+3 |
| | |||||
* | Separate HTTP preview code and URL previewer. (#15269) | Patrick Cloke | 2023-03-20 | 1 | -0/+833 |
| | | | Separates REST layer code from the actual URL previewing. | ||||
* | Refactor media modules. (#15146) | Patrick Cloke | 2023-02-27 | 8 | -0/+3469 |
| | | | | | | | * 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. | ||||
* | Move rest APIs back under the rest directory | Mark Haines | 2015-01-22 | 11 | -1248/+0 |
| | |||||
* | make our JPEG thumbnail quality less horrifically ugly | Matthew Hodgson | 2015-01-08 | 1 | -1/+1 |
| | |||||
* | Change error message for missing pillow libs. | Kegan Dougal | 2015-01-07 | 1 | -2/+4 |
| | |||||
* | Merge branch 'master' into develop | Mark Haines | 2015-01-06 | 1 | -0/+1 |
|\ | |||||
| * | Return the argument passed to the callback in a deferred callback, otherwise ↵ | Mark Haines | 2014-12-29 | 1 | -0/+1 |
| | | | | | | | | twisted will replace the deferred result with 'None' | ||||
* | | SYN-32 Use the ANTIALIAS resize method for thumbnailing images | Mark Haines | 2015-01-06 | 1 | -3/+3 |
| | | |||||
* | | Update copyright notices | Mark Haines | 2015-01-06 | 9 | -9/+23 |
| | | |||||
* | | SYN-208/SYN-228: Add runtime checks on startup to enforce that JPEG/PNG ↵ | Kegan Dougal | 2015-01-06 | 1 | -0/+29 |
| | | | | | | | | support is included when installing pillow. | ||||
* | | SYN-229: Include Content-Length when downloading files | Mark Haines | 2015-01-06 | 3 | -7/+23 |
|/ | |||||
* | SYN-203: Handle requests for thunbnails for images that are small | Mark Haines | 2014-12-19 | 1 | -5/+14 |
| | |||||
* | clean up coding style a bit | Mark Haines | 2014-12-16 | 1 | -0/+1 |
| | |||||
* | Update media_repository.py | Kegsay | 2014-12-15 | 1 | -1/+1 |
| | | | _ not - | ||||
* | Update docs in media_repository | Mark Haines | 2014-12-15 | 1 | -2/+2 |
| | |||||
* | return an mxc uri rather than a content_token. | Mark Haines | 2014-12-15 | 1 | -1/+3 |
| | |||||
* | Fix typo in media repository doc string | Mark Haines | 2014-12-11 | 1 | -1/+1 |
| | |||||
* | Fix media repository doc string to include server_name | Mark Haines | 2014-12-11 | 1 | -3/+3 |
| | |||||
* | Allow only one download for a given image at a time, so that we don't end up ↵ | Mark Haines | 2014-12-11 | 3 | -20/+29 |
| | | | | downloading the same image twice if two clients request a remote image at the same time | ||||
* | Limit the size of images that are thumbnailed serverside. Limit the size of ↵ | Mark Haines | 2014-12-11 | 1 | -0/+18 |
| | | | | file that a server will download from a remote server | ||||
* | doc the thumbnail methods | Mark Haines | 2014-12-11 | 1 | -2/+11 |
| | |||||
* | Make sure we pass a tuple to string '%' formatting | Mark Haines | 2014-12-11 | 1 | -2/+2 |
| | |||||
* | import Image as PIL.Image. | Mark Haines | 2014-12-10 | 1 | -1/+1 |
| | |||||
* | Get the code actually working | Mark Haines | 2014-12-10 | 5 | -46/+53 |
| | |||||
* | Thumbnail uploaded and cached images | Mark Haines | 2014-12-10 | 6 | -169/+581 |
| | |||||
* | Add a class for generating thumbnails using PIL | Mark Haines | 2014-12-05 | 1 | -0/+78 |
| | |||||
* | Implement download support for media_repository | Mark Haines | 2014-12-04 | 3 | -4/+203 |
| | |||||
* | Fix pyflakes and pep8 warnings | Mark Haines | 2014-12-02 | 2 | -1/+3 |
| | |||||
* | Get uploads working with new media repo | Mark Haines | 2014-12-02 | 6 | -23/+16 |
| | |||||
* | Write the upload portion of version 1 of the media repository | Mark Haines | 2014-12-02 | 4 | -0/+447 |