Skip to content

Commit

Permalink
fixed route
Browse files Browse the repository at this point in the history
  • Loading branch information
toastxc committed Sep 1, 2023
1 parent f71a8bf commit f75a3b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/routes/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ pub async fn post(req: HttpRequest, mut payload: Multipart) -> Result<HttpRespon
let (tag_id, tag) = get_tag(&req)?;

if let Ok(Some(mut field)) = payload.try_next().await {
let content_type = field.content_disposition().ok_or(Error::FailedToReceive)?;
let content_type = field.content_disposition();

let filename = content_type
.get_filename()
.ok_or(Error::FailedToReceive)?
Expand Down

0 comments on commit f75a3b7

Please sign in to comment.