Skip to content
Snippets Groups Projects
Commit 829307c8 authored by 🥺's avatar 🥺 :transgender_flag: Committed by 🥺
Browse files

disallow svg MIME types to be `inline` Content-Disposition

parent 2bd7a922
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,13 @@ pub(crate) fn content_disposition_type(buf: &[u8], _content_type: &Option<String
};
match file_type.matcher_type() {
MatcherType::Image | MatcherType::Audio | MatcherType::Text | MatcherType::Video => "inline",
MatcherType::Image | MatcherType::Audio | MatcherType::Text | MatcherType::Video => {
if file_type.mime_type().contains("svg") {
"attachment"
} else {
"inline"
}
},
_ => "attachment",
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment