warn for non-image path
This commit is contained in:
parent
fd9e7f6d68
commit
b5d8842ccc
1 changed files with 4 additions and 0 deletions
|
@ -396,6 +396,10 @@ async fn upload_file(
|
|||
let response = WrappedResponse::Tags(final_tag_set.into_iter().collect::<Vec<_>>());
|
||||
Ok((StatusCode::OK, Json(response)))
|
||||
} else {
|
||||
if !file_type.starts_with("image/") {
|
||||
log::warn!("warning: mimetype {} is not image/", file_type);
|
||||
}
|
||||
|
||||
let json_response =
|
||||
send_image_to_dd(file_contents.to_vec(), file_name, &file_type, &options).await?;
|
||||
Ok((StatusCode::OK, Json(json_response)))
|
||||
|
|
Loading…
Reference in a new issue