Add delete files and dockerize application

This commit is contained in:
2024-12-09 15:54:08 +01:00
parent 75f1e59816
commit 3e6a8e3e37
10 changed files with 136 additions and 48 deletions

View File

@@ -1,6 +1,7 @@
const form = document.getElementById('data-upload');
const fileInput = document.getElementById('file-input');
const protectedInput = document.getElementById('protected-input');
const protectedInput = document.getElementById('protected');
const uniqueNameInput = document.getElementById('unique_name');
const uploadData = async () => {
if (!fileInput.files.length) {
@@ -11,6 +12,7 @@ const uploadData = async () => {
const formData = new FormData();
formData.append('file', fileInput.files[0]);
formData.append('protected', protectedInput.checked ? 'true' : 'false');
formData.append('unique_name', uniqueNameInput.checked ? 'true' : 'false');
try {
const response = await fetch('/api/data/upload', {