fix
This commit is contained in:
parent
5e70207c5d
commit
e39a4ab897
@ -55,12 +55,7 @@ async fn handle_request(mut payload: Multipart) -> Result<Response<Full<Bytes>>,
|
||||
let mut data: Vec<u8> = Vec::new();
|
||||
|
||||
while let Some(field) = payload.next_field().await.unwrap() {
|
||||
let content_type = field.content_type().unwrap();
|
||||
|
||||
match content_type {
|
||||
"image/jpeg" | "image/png" => data = field.bytes().await.unwrap().to_vec(),
|
||||
_ => return Err(StatusCode::UNSUPPORTED_MEDIA_TYPE.into_response()),
|
||||
}
|
||||
data = field.bytes().await.unwrap().to_vec();
|
||||
}
|
||||
|
||||
START.call_once(|| magick_wand_genesis());
|
||||
|
Loading…
Reference in New Issue
Block a user