mirror of
https://github.com/Kozea/Radicale.git
synced 2025-04-05 06:07:35 +03:00
use basename of uploaded file as default collection name, support https://github.com/Kozea/Radicale/issues/1633
This commit is contained in:
parent
3910457a8d
commit
7318f592c8
1 changed files with 3 additions and 2 deletions
|
@ -874,8 +874,7 @@ function UploadCollectionScene(user, password, collection) {
|
||||||
upload_btn.onclick = upload_start;
|
upload_btn.onclick = upload_start;
|
||||||
uploadfile_form.onchange = onfileschange;
|
uploadfile_form.onchange = onfileschange;
|
||||||
|
|
||||||
let href = random_uuid();
|
href_form.value = "";
|
||||||
href_form.value = href;
|
|
||||||
|
|
||||||
/** @type {?number} */ let scene_index = null;
|
/** @type {?number} */ let scene_index = null;
|
||||||
/** @type {?XMLHttpRequest} */ let upload_req = null;
|
/** @type {?XMLHttpRequest} */ let upload_req = null;
|
||||||
|
@ -993,10 +992,12 @@ function UploadCollectionScene(user, password, collection) {
|
||||||
hreflimitmsg_html.classList.remove("hidden");
|
hreflimitmsg_html.classList.remove("hidden");
|
||||||
href_form.classList.add("hidden");
|
href_form.classList.add("hidden");
|
||||||
href_label.classList.add("hidden");
|
href_label.classList.add("hidden");
|
||||||
|
href_form.value = random_uuid(); // dummy, will be replaced on upload
|
||||||
}else{
|
}else{
|
||||||
hreflimitmsg_html.classList.add("hidden");
|
hreflimitmsg_html.classList.add("hidden");
|
||||||
href_form.classList.remove("hidden");
|
href_form.classList.remove("hidden");
|
||||||
href_label.classList.remove("hidden");
|
href_label.classList.remove("hidden");
|
||||||
|
href_form.value = files[0].name.replace(/\.(ics|vcf)$/, '');
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue