mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-01 18:33:04 +02:00
code fmt change.
This commit is contained in:
parent
00fc3afcd7
commit
d7671942a6
10 changed files with 54 additions and 52 deletions
|
@ -10,13 +10,11 @@ import (
|
|||
"demodesk/neko/internal/utils"
|
||||
)
|
||||
|
||||
const (
|
||||
// Maximum upload of 32 MB files.
|
||||
MAX_UPLOAD_SIZE = 32 << 20
|
||||
)
|
||||
// maximum upload size of 32 MB
|
||||
const maxUploadSize = 32 << 20
|
||||
|
||||
func (h *RoomHandler) uploadDrop(w http.ResponseWriter, r *http.Request) {
|
||||
err := r.ParseMultipartForm(MAX_UPLOAD_SIZE)
|
||||
err := r.ParseMultipartForm(maxUploadSize)
|
||||
if err != nil {
|
||||
utils.HttpBadRequest(w, "failed to parse multipart form")
|
||||
return
|
||||
|
@ -87,7 +85,7 @@ func (h *RoomHandler) uploadDrop(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
func (h *RoomHandler) uploadDialogPost(w http.ResponseWriter, r *http.Request) {
|
||||
err := r.ParseMultipartForm(MAX_UPLOAD_SIZE)
|
||||
err := r.ParseMultipartForm(maxUploadSize)
|
||||
if err != nil {
|
||||
utils.HttpBadRequest(w, "failed to parse multipart form")
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue