Accept SVG content type with charset
All checks were successful
build-and-deploy / build-deploy (push) Successful in 35s

This commit is contained in:
androidlover5842
2026-01-29 10:04:37 +05:30
parent 2f5bb5985f
commit bef941f417

View File

@@ -174,7 +174,7 @@ class Guests(
throw ResponseStatusException(HttpStatus.BAD_REQUEST, "File is empty")
}
val contentType = file.contentType ?: ""
if (!contentType.equals("image/svg+xml", ignoreCase = true)) {
if (!contentType.lowercase().startsWith("image/svg+xml")) {
throw ResponseStatusException(HttpStatus.BAD_REQUEST, "Only SVG allowed")
}