diff --git a/router/router_server_files.go b/router/router_server_files.go index 712010a..7fd19e1 100644 --- a/router/router_server_files.go +++ b/router/router_server_files.go @@ -397,14 +397,14 @@ func postServerUploadFiles(c *gin.Context) { for _, header := range headers { p, err := s.Filesystem().SafePath(filepath.Join(directory, header.Filename)) if err != nil { - c.AbortWithError(http.StatusInternalServerError, err) + TrackedServerError(err, s).AbortFilesystemError(c) return } // We run this in a different method so I can use defer without any of // the consequences caused by calling it in a loop. if err := handleFileUpload(p, s, header); err != nil { - c.AbortWithError(http.StatusInternalServerError, err) + TrackedServerError(err, s).AbortFilesystemError(c) return } }