CreatedBy Header
This commit is contained in:
parent
0e4532828a
commit
5af5bb3e95
1 changed files with 4 additions and 1 deletions
|
@ -11,7 +11,7 @@ use axum::{
|
|||
body::{HttpBody, StreamBody},
|
||||
debug_handler,
|
||||
extract::{BodyStream, FromRef, FromRequest, Multipart, Path, Query, State},
|
||||
headers::ContentType,
|
||||
headers::{ContentType, Range},
|
||||
http::{
|
||||
header::{self, CONTENT_TYPE},
|
||||
HeaderMap, Request, StatusCode,
|
||||
|
@ -355,6 +355,9 @@ async fn get_item(
|
|||
header::CONTENT_LENGTH,
|
||||
metadata.size.unwrap_or_default().into(),
|
||||
);
|
||||
if let Ok(subject) = metadata.subject.parse() {
|
||||
headers.insert("CreatedBy", subject);
|
||||
}
|
||||
|
||||
if let Some(content_type) = metadata.content_type.and_then(|x| x.parse().ok()) {
|
||||
headers.insert(header::CONTENT_TYPE, content_type);
|
||||
|
|
Loading…
Reference in a new issue