fix: admin 'Upload photo' action (modal FileUpload, stores to MinIO, sets photo_url — no foreach 500); user upload limit 5MB->10MB; photo_url input shows full value (visual truncation only)
This commit is contained in:
@@ -184,7 +184,7 @@ func (a *App) UploadPhoto(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if err := r.ParseMultipartForm(5 << 20); err != nil { // 5 MB
|
||||
if err := r.ParseMultipartForm(10 << 20); err != nil { // 10 MB
|
||||
writeUploadMsg(w, "Upload too large (max 5 MB).")
|
||||
return
|
||||
}
|
||||
@@ -195,7 +195,7 @@ func (a *App) UploadPhoto(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
if header.Size > 5<<20 {
|
||||
if header.Size > 10<<20 {
|
||||
writeUploadMsg(w, "Upload too large (max 5 MB).")
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user