| 165 | } |
| 166 | |
| 167 | func (h *HttpServer) openDirectoryDialog(w http.ResponseWriter, r *http.Request) { |
| 168 | folder, err := runtime.OpenDirectoryDialog(appOnce.ctx, runtime.OpenDialogOptions{ |
| 169 | DefaultDirectory: "", |
| 170 | Title: "Select a folder", |
| 171 | }) |
| 172 | if err != nil { |
| 173 | h.error(w, err.Error()) |
| 174 | return |
| 175 | } |
| 176 | h.success(w, respData{ |
| 177 | "folder": folder, |
| 178 | }) |
| 179 | } |
| 180 | |
| 181 | func (h *HttpServer) openFileDialog(w http.ResponseWriter, r *http.Request) { |
| 182 | filePath, err := runtime.OpenFileDialog(appOnce.ctx, runtime.OpenDialogOptions{ |