Skip to content

Commit 58e6150

Browse files
committed
minor edits
1 parent b1da78c commit 58e6150

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

Diff for: proposals/3911-linking-media-to-events.md

+15-10
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ to a user if the user can see the corresponding event.
3939
2. Attaching media
4040

4141
* The methods for sending events
42-
([`PUT /_matrix/client/v3/rooms/{roomId}/state/{eventType}/{stateKey}`](PUT /_matrix/client/v3/rooms/{roomId}/state/{eventType}/{stateKey})
43-
and [`PUT /_matrix/client/v3/rooms/{roomId}/state/{eventType}/{stateKey}`](https://spec.matrix.org/v1.4/client-server-api/#put_matrixclientv3roomsroomidsendeventtypetxnid)
42+
([`PUT /_matrix/client/v3/rooms/{roomId}/state/{eventType}/{stateKey}`](https://spec.matrix.org/v1.4/client-server-api/#put_matrixclientv3roomsroomidstateeventtypestatekey)
43+
and [`PUT /_matrix/client/v3/rooms/{roomId}/state/{eventType}/{stateKey}`](https://spec.matrix.org/v1.4/client-server-api/#put_matrixclientv3roomsroomidsendeventtypetxnid))
4444
are extended to take a query parameter `attach_media`, whose value must be a complete `mxc:` URI.
4545

4646
The `attach_media` parameter may be used several times to attach several
47-
pieces of media to the same event. The maximium number of pieces of media
47+
pieces of media to the same event. The maximum number of pieces of media
4848
that can be attached to a single event is implementation-defined by servers.
4949

5050
If any of the `attach_media` parameters do not correspond to known
@@ -62,7 +62,7 @@ to a user if the user can see the corresponding event.
6262
(with the original event ID) even though the media has already been attached.
6363

6464
* Alternatively, if a restricted media item is referenced in a call to
65-
[`PUT /_matrix/client/v3/profile/{userId}/avatar_url`](PUT /_matrix/client/v3/profile/{userId}/avatar_url),
65+
[`PUT /_matrix/client/v3/profile/{userId}/avatar_url`](https://spec.matrix.org/v1.4/client-server-api/#put_matrixclientv3profileuseridavatar_url)
6666
it is instead attached to the user's profile.
6767

6868
Again, if the media is already attached, the server responds with a 400 error with
@@ -83,8 +83,8 @@ to a user if the user can see the corresponding event.
8383
| [`GET /_matrix/media/v3/download/{serverName}/{mediaId}/{fileName}`](https://spec.matrix.org/v1.4/client-server-api/#get_matrixmediav3downloadservernamemediaid) | `GET /_matrix/client/v1/media/download/{serverName}/{mediaId}/{fileName}` | N/A |
8484
| [`GET /_matrix/media/v3/thumbnail/{serverName}/{mediaId}`](https://spec.matrix.org/v1.4/client-server-api/#get_matrixmediav3thumbnailservernamemediaid) | `GET /_matrix/client/v1/media/thumbnail/{serverName}/{mediaId}` | `GET /_matrix/federation/v1/media/thumbnail/{serverName}/{mediaId}` |
8585

86-
[Question: should we move `/config`, and `/preview_url` while
87-
we're at it, per [MSC1902](https://github.com/matrix-org/matrix-spec-proposals/pull/1902)?]
86+
[TODO: we should probably move `/config`, and `/preview_url` while
87+
we're at it]
8888

8989
None of the new endpoints take an `allow_remote` query parameter. (For
9090
`/_matrix/client`, servers should always attempt to request remote
@@ -104,7 +104,7 @@ to a user if the user can see the corresponding event.
104104
the corresponding original endpoints.
105105

106106
* For the new `/_matrix/federation` endpoints, the response is
107-
[`multipart/mixed`]https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html)
107+
[`multipart/mixed`](https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html)
108108
content with two parts: the first must be a JSON object
109109
(and should have a `Content-type: application/json` header), and the second
110110
is the media item as per the original endpoints. The json object may have
@@ -291,9 +291,6 @@ media without attaching it to anything.
291291
292292
## Alternatives
293293
294-
* Use some sort of "content token" for each piece of media, and require clients to
295-
provide it, per [MSC3910](https://github.com/matrix-org/matrix-spec-proposals/pull/3910).
296-
297294
* Allow clients to upload media which does not require authentication (for
298295
example via a `public=true` query parameter). This might be particularly
299296
useful for IRC/XMPP bridges, which could upload any media they encounter to
@@ -309,6 +306,14 @@ media without attaching it to anything.
309306
this gives, beyond the fact a nonce could be smaller so marginally fewer
310307
bytes to send.
311308
309+
* Rather than messing with multiplart content, have a separate endpoint for
310+
servers to get the access controls for a media item. That would mean two
311+
requests, but might make more sense than both `/thumbnail` and `/download`
312+
providing the info.
313+
314+
* Use some sort of "content token" for each piece of media, and require clients to
315+
provide it, per [MSC3910](https://github.com/matrix-org/matrix-spec-proposals/pull/3910).
316+
312317
## Security considerations
313318
314319
* Letting servers track the relationship between events and media is a metadata

0 commit comments

Comments
 (0)