diff -r d7942163a2a3 -r cdcb20412dd4 application/application.c --- a/application/application.c Thu Feb 08 10:24:20 2024 +0100 +++ b/application/application.c Thu Feb 08 10:29:29 2024 +0100 @@ -166,8 +166,12 @@ static void file_selected(UiEvent *event, void *data) { UiFileList *files = event->eventdata; - - char *file = files->files[0]; + if (files && files->nfiles > 0) { + // files will be freed by the filedialog handler, therefore we need a copy + UiFileList uploadList = ui_filelist_copy(*files); // uploadList will be freed by davbrowser_upload_files + davbrowser_upload_files(event->obj, event->document, uploadList); + } + } void action_upload_file(UiEvent *event, void *data) {