You've already forked reloading-manager
A full commitment's what I'm thinking of
This commit is contained in:
@@ -2,18 +2,12 @@ package handlers
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func ReadFile(c echo.Context, formName string) ([]byte, error) {
|
||||
file, err := c.FormFile(formName)
|
||||
if err != nil {
|
||||
c.Logger().Error(err)
|
||||
_ = c.JSON(http.StatusBadRequest, struct {
|
||||
Message string `json:"message"`
|
||||
}{
|
||||
Message: "No file provided",
|
||||
})
|
||||
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user