fileserver
This commit is contained in:
15
static/script.js
Normal file
15
static/script.js
Normal 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
|
||||
});
|
||||
Reference in New Issue
Block a user