mirror of
https://github.com/45Drives/cockpit-navigator.git
synced 2025-07-30 00:55:30 +02:00
add option to replace file on upload
This commit is contained in:
parent
9189daf1cd
commit
2da2b2705a
@ -1003,8 +1003,8 @@ class FileUpload {
|
|||||||
|
|
||||||
async upload() {
|
async upload() {
|
||||||
if (await this.check_if_exists()) {
|
if (await this.check_if_exists()) {
|
||||||
window.alert(this.filename + ": File exists.");
|
if (!window.confirm(this.filename + ": File exists. Replace?"))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.make_html_element();
|
this.make_html_element();
|
||||||
this.proc = cockpit.spawn(["/usr/share/cockpit/navigator/scripts/write-chunks.py", this.path], {err: "out", superuser: "try"});
|
this.proc = cockpit.spawn(["/usr/share/cockpit/navigator/scripts/write-chunks.py", this.path], {err: "out", superuser: "try"});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user