Correct http code for uploaded file
This commit is contained in:
parent
f28c204c52
commit
750184b8ef
@ -46,7 +46,7 @@ func UploadPDF(c *b.Config, s *b.CookieStore) http.HandlerFunc {
|
||||
}
|
||||
|
||||
if http.DetectContentType(buffer) != "application/pdf" {
|
||||
http.Error(w, "Die Datei ist kein PDF.", http.StatusInternalServerError)
|
||||
http.Error(w, "Die Datei ist kein PDF.", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user