mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-02 02:42:47 +02:00
file chooser dialog events implementation.
This commit is contained in:
parent
22d31e871c
commit
d4e0287eb5
13 changed files with 129 additions and 157 deletions
|
@ -97,7 +97,7 @@ func (h *RoomHandler) uploadDialogPost(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
defer r.MultipartForm.RemoveAll()
|
||||
|
||||
if !h.desktop.IsFileChooserDialogOpen() {
|
||||
if !h.desktop.IsFileChooserDialogOpened() {
|
||||
utils.HttpBadRequest(w, "Open file chooser dialog first.")
|
||||
return
|
||||
}
|
||||
|
@ -149,15 +149,11 @@ func (h *RoomHandler) uploadDialogPost(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
func (h *RoomHandler) uploadDialogClose(w http.ResponseWriter, r *http.Request) {
|
||||
if !h.desktop.IsFileChooserDialogOpen() {
|
||||
if !h.desktop.IsFileChooserDialogOpened() {
|
||||
utils.HttpBadRequest(w, "File chooser dialog is not open.")
|
||||
return
|
||||
}
|
||||
|
||||
if !h.desktop.CloseFileChooserDialog() {
|
||||
utils.HttpInternalServerError(w, "Unable to close file chooser dialog.")
|
||||
return
|
||||
}
|
||||
|
||||
h.desktop.CloseFileChooserDialog()
|
||||
utils.HttpSuccess(w)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue