Add `upload_method` field, document expiry of external URL

pull/3870/head
Nick Mills-Barrett 1 year ago
parent af3d0fcb8d
commit 3c9e240a94
No known key found for this signature in database
GPG Key ID: 31F23F2CF354937B

@ -31,12 +31,14 @@ client may continue to upload via the new upload endpoint defined in MSC2246.
{
"content_uri": "mxc://example.com/AQwafuaFswefuhsfAFAgsw",
"unused_expires_at": 1647257217083,
"upload_method": "PUT",
"upload_url": "https://cdn.example.com/media-repo/upload/XAPw4CtrzArk?signed=h4tGOHvCu"
}
```
If the client chooses to upload media via the `upload_url` field it must use a `PUT` request, in this
case:
If the client chooses to upload media via the `upload_url` field it must use the method specified
by the `upload_method` field. Clients should expect the upload URL to work until `unused_expires_at`
time, afterwhich a new media would need to be created. Upload request based on the above response:
`PUT https://cdn.example.com/media-repo/upload/XAPw4CtrzArk?signed=h4tGOHvCu`

Loading…
Cancel
Save