-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(media): support async upload #4165
Conversation
553c2e0
to
c5f8e17
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4165 +/- ##
==========================================
- Coverage 84.85% 84.83% -0.02%
==========================================
Files 269 269
Lines 28916 28937 +21
==========================================
+ Hits 24536 24549 +13
- Misses 4380 4388 +8 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for adding a doc example, small nit about the changelog. First word should be capitalized if I look at the other changelog entries.
// Unfortunately, the spec says a server will return 404 for either an expired MXC | ||
// ID or a non-existing MXC ID. Do a best-effort guess to recognize an expired MXC | ||
// ID based on the error string, which will work with Synapse (as of 2024-10-23). | ||
Some(ErrorKind::Unknown) if err.to_string().contains("expired") => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch.
Changelog: Support for preallocated media content URI has been added in `Media::create_content_uri()`, and uploading the content for such a preallocated URI is possible with `Media::upload_preallocated()`.
c5f8e17
to
0ec1d24
Compare
This adds support for preallocated a MXC ID and using it to upload content later.
Part of #1732.