diff options
author | Alex Vitkov <alexvitkov98@gmail.com> | 2021-02-13 11:58:04 +0200 |
---|---|---|
committer | Alex Vitkov <alexvitkov98@gmail.com> | 2021-02-13 11:58:04 +0200 |
commit | bb9d4f024e7cfa1c79fc1e4118774fa4ea2fd3bd (patch) | |
tree | 8464e74359537962d3565ba8c2757292918291ff /loggedin.js | |
parent | 508baff21febbd3676ce29d4d45e326d8a11cc4b (diff) | |
download | fileup-bb9d4f024e7cfa1c79fc1e4118774fa4ea2fd3bd.tar.gz |
/php/rename.php
Diffstat (limited to 'loggedin.js')
-rw-r--r-- | loggedin.js | 7 |
1 files changed, 3 insertions, 4 deletions
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); |