* POC for API handler opts modifier

* Made upload POSt api a  file upload API

* Specified file upload local API

* Specified file upload local API

* Specified file upload API

* Simplified handler params

* Added basic security checks

* Fixed i18n

* used type for API handler options

* Removed limited reader from util deserializers (#26263)
Этот коммит содержится в:
Harshil Sharma
2024-02-21 17:43:50 +05:30
коммит произвёл GitHub
родитель ecb09de6c7
Коммит 521844fed5
24 изменённых файлов: 127 добавлений и 165 удалений

Просмотреть файл

@@ -17,9 +17,9 @@ import (
)
func (api *API) InitUpload() {
api.BaseRoutes.Uploads.Handle("", api.APISessionRequired(createUpload)).Methods("POST")
api.BaseRoutes.Uploads.Handle("", api.APISessionRequired(createUpload, handlerParamFileAPI)).Methods("POST")
api.BaseRoutes.Upload.Handle("", api.APISessionRequired(getUpload)).Methods("GET")
api.BaseRoutes.Upload.Handle("", api.APISessionRequired(uploadData)).Methods("POST")
api.BaseRoutes.Upload.Handle("", api.APISessionRequired(uploadData, handlerParamFileAPI)).Methods("POST")
}
func createUpload(c *Context, w http.ResponseWriter, r *http.Request) {