From 750184b8efe6e9d7eef4fdc151ee292f9f55f825 Mon Sep 17 00:00:00 2001 From: Jason Streifling Date: Fri, 4 Oct 2024 16:46:29 +0200 Subject: [PATCH] Correct http code for uploaded file --- cmd/frontend/pdf.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/frontend/pdf.go b/cmd/frontend/pdf.go index 6a4e5e4..5d25554 100644 --- a/cmd/frontend/pdf.go +++ b/cmd/frontend/pdf.go @@ -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 }