fileserver

This commit is contained in:
Vasily.onl
2025-06-23 12:01:06 +08:00
parent 245ded50ef
commit bf6fffd52c
3 changed files with 95 additions and 17 deletions

15
static/script.js Normal file
View File

@@ -0,0 +1,15 @@
async function deleteFile(filename) {
if (confirm('Are you sure you want to delete ' + filename + '?')) {
const response = await fetch(`/delete_file/${filename}`, { method: 'DELETE' });
const data = await response.json();
alert(data.message);
if (response.ok) {
location.reload(); // Reload the page to update the file list
}
}
}
// Initial check when page loads
document.addEventListener('DOMContentLoaded', () => {
// No archive functions needed now
});