Skip to content

AP2: New create and upload endpoints to create restricted media - #89

Merged
nico-famedly merged 1 commit into
msc3911from
syk/msc3911-unstable-endpoint
Aug 28, 2025
Merged

AP2: New create and upload endpoints to create restricted media#89
nico-famedly merged 1 commit into
msc3911from
syk/msc3911-unstable-endpoint

Conversation

@itsoyou

@itsoyou itsoyou commented Aug 13, 2025

Copy link
Copy Markdown
Member

Linked Media MSC3911 AP2: New create and upload endpoints to create restricted media #3351

For linking media, we need new endpoints to create restricted media files:
Screenshot 2025-08-13 at 17 13 55
These are equivalent to the existing create and upload endpoints for media, but create restricted media in a pending state (until the media is attached).

Question

get_local_media function of GET /_matrix/client/v1/media/download/{server_name}/{media_id}/{filename} endpoint is updated to make sure resource is not accessible to others in pending state. However, I am not sure what to do with remote media case.

Acceptance criteria

  • The new endpoints are implemented and available, when the MSC is enabled.
  • ONLY the unstable endpoints are available. The stable urls should only be implemented, when the MSC is merged.
  • Appropriate tests to validate, that media created this way is actually in the pending state.

Comment thread synapse/rest/media/create_resource.py Outdated
@itsoyou
itsoyou force-pushed the syk/msc3911-unstable-endpoint branch 3 times, most recently from 0634d28 to 18bdf34 Compare August 24, 2025 20:35
@itsoyou
itsoyou marked this pull request as ready for review August 24, 2025 20:35
@itsoyou
itsoyou requested a review from a team as a code owner August 24, 2025 20:35
@itsoyou
itsoyou requested a review from nico-famedly August 24, 2025 20:36
@itsoyou itsoyou changed the title WIP: AP2: New create and upload endpoints to create restricted media AP2: New create and upload endpoints to create restricted media Aug 24, 2025
Comment thread synapse/rest/client/media.py Outdated
Comment thread synapse/rest/media/upload_resource.py Outdated
Comment thread tests/rest/client/test_media.py
Comment thread synapse/rest/client/media.py Outdated
Comment thread synapse/rest/client/media.py Outdated

@nico-famedly nico-famedly left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me :)

Comment thread tests/rest/client/test_media.py Outdated
Comment thread synapse/rest/media/create_resource.py Outdated
Comment thread synapse/rest/media/upload_resource.py
Comment thread synapse/rest/media/create_resource.py
Comment thread tests/rest/client/test_media.py Outdated
@itsoyou
itsoyou force-pushed the syk/msc3911-unstable-endpoint branch from 213606d to c5e1337 Compare August 28, 2025 08:46
@nico-famedly
nico-famedly merged commit 4456cf3 into msc3911 Aug 28, 2025
20 of 23 checks passed
@nico-famedly
nico-famedly deleted the syk/msc3911-unstable-endpoint branch August 28, 2025 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants