From bb9d4f024e7cfa1c79fc1e4118774fa4ea2fd3bd Mon Sep 17 00:00:00 2001 From: Alex Vitkov Date: Sat, 13 Feb 2021 11:58:04 +0200 Subject: /php/rename.php --- loggedin.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'loggedin.js') diff --git a/loggedin.js b/loggedin.js index 324a18a..8681dba 100644 --- a/loggedin.js +++ b/loggedin.js @@ -134,15 +134,14 @@ function delete_file(filename) { } function rename_file(filename) { - var file_full_path = path_combine(get_path(), filename); - var new_name = prompt(`Rename ${filename} to`, filename); if (!new_name) return; var data = new FormData(); - data.append('path', file_full_path); - data.append('new_name', new_name); + data.append('folder', get_path()); + data.append('old_filename', filename); + data.append('new_filename', new_name); var xhr = new XMLHttpRequest(); xhr.open('POST', '/php/rename.php', true); -- cgit v1.2.3