cargo update ruma httparse

This adds authenticated media APIs.
This commit is contained in:
Lambda 2024-07-21 13:22:42 +00:00
parent 556f2157a2
commit 5a5bea3217
5 changed files with 78 additions and 47 deletions

View file

@ -1,6 +1,7 @@
use std::io::Cursor;
use image::imageops::FilterType;
use ruma::http_headers::ContentDisposition;
use tokio::{
fs::File,
io::{AsyncReadExt, AsyncWriteExt},
@ -35,7 +36,7 @@ impl Service {
pub(crate) async fn create(
&self,
mxc: String,
content_disposition: Option<&str>,
content_disposition: Option<&ContentDisposition>,
content_type: Option<&str>,
file: &[u8],
) -> Result<()> {
@ -44,7 +45,7 @@ impl Service {
mxc,
0,
0,
content_disposition,
content_disposition.map(ContentDisposition::to_string).as_deref(),
content_type,
)?;