upload drop to config.

This commit is contained in:
Miroslav Šedivý
2023-11-24 10:44:24 +01:00
parent b40c0778c8
commit 3dbcc41795
4 changed files with 16 additions and 0 deletions

View File

@ -16,6 +16,10 @@ import (
const maxUploadSize = 32 << 20
func (h *RoomHandler) uploadDrop(w http.ResponseWriter, r *http.Request) error {
if !h.desktop.IsUploadDropEnabled() {
return utils.HttpBadRequest("upload drop is disabled")
}
err := r.ParseMultipartForm(maxUploadSize)
if err != nil {
return utils.HttpBadRequest("failed to parse multipart form").WithInternalErr(err)