bugfix: delete files with % in filename (fix #55)
Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
parent
2c093913e8
commit
458444f03a
@ -403,7 +403,7 @@
|
||||
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
|
||||
let link = document.createElement("a");
|
||||
link.download = name;
|
||||
link.href = 'http://' + this.hostname + ':' + this.port + '/server/files/' + filename;
|
||||
link.href = 'http://' + this.hostname + ':' + this.port + '/server/files/' + encodeURIComponent(filename);
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
@ -435,7 +435,7 @@
|
||||
removeFile() {
|
||||
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
|
||||
axios.delete(
|
||||
'http://'+ this.hostname + ':' + this.port +'/server/files/'+filename
|
||||
'http://'+ this.hostname + ':' + this.port +'/server/files/'+encodeURIComponent(filename)
|
||||
).then((result) => {
|
||||
this.$toast.success(result.data.result+" successfully deleted.");
|
||||
}).catch(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user