From 3c9e240a949b4f9228639983a38b356e88c37767 Mon Sep 17 00:00:00 2001 From: Nick Mills-Barrett Date: Sat, 10 Aug 2024 13:53:41 +0100 Subject: [PATCH] Add `upload_method` field, document expiry of external URL --- proposals/3870-media-async-upload-url.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/proposals/3870-media-async-upload-url.md b/proposals/3870-media-async-upload-url.md index 4ff45a33f..e00249a71 100644 --- a/proposals/3870-media-async-upload-url.md +++ b/proposals/3870-media-async-upload-url.md @@ -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`