mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: update resource max size
This commit is contained in:
@ -31,7 +31,12 @@ func handleGetMyResources(w http.ResponseWriter, r *http.Request) {
|
||||
func handleUploadResource(w http.ResponseWriter, r *http.Request) {
|
||||
userId, _ := GetUserIdInSession(r)
|
||||
|
||||
r.ParseMultipartForm(10 << 20)
|
||||
err := r.ParseMultipartForm(5 << 20)
|
||||
|
||||
if err != nil {
|
||||
e.ErrorHandler(w, "OVERLOAD_MAX_SIZE", "The max size of resource is 5Mb.")
|
||||
return
|
||||
}
|
||||
|
||||
file, handler, err := r.FormFile("file")
|
||||
|
||||
|
Reference in New Issue
Block a user