Skip to content

Commit

Permalink
classify text/plain as svg
Browse files Browse the repository at this point in the history
  • Loading branch information
blesswinsamuel committed Oct 22, 2023
1 parent 1913f23 commit ffe1d53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/mediaprocessor/media_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func NewMediaProcessor() *MediaProcessor {
func getContentType(imageBytes []byte) string {
contentType := http.DetectContentType(imageBytes)
// fmt.Println(contentType)
if contentType == "text/xml; charset=utf-8" {
if contentType == "text/xml; charset=utf-8" || contentType == "text/plain; charset=utf-8" {
contentType = "image/svg+xml"
}
return contentType
Expand Down

0 comments on commit ffe1d53

Please sign in to comment.