Dateien nach „routers/web“ hochladen

This commit is contained in:
davrot 2025-01-27 20:37:18 +00:00
parent 4a20a897e4
commit 17b690673d

View file

@ -51,12 +51,12 @@ import (
_ "code.gitea.io/gitea/modules/session" // to registers all internal adapters
"code.forgejo.org/go-chi/binding"
"code.forgejo.org/go-chi/captcha"
chi_middleware "github.com/go-chi/chi/v5/middleware"
"github.com/go-chi/cors"
"github.com/klauspost/compress/gzhttp"
"github.com/prometheus/client_golang/prometheus"
"code.forgejo.org/go-chi/binding"
)
var GzipMinSize = gzhttp.DefaultMinSize
@ -1675,7 +1675,6 @@ func registerRoutes(m *web.Route) {
func BindUpload(f forms.UploadRepoFileForm) http.HandlerFunc {
return func(resp http.ResponseWriter, req *http.Request) {
theObj := new(forms.UploadRepoFileForm) // create a new form obj for every request but not use obj directly
data := middleware.GetContextData(req.Context())
binding.Bind(req, theObj)