diff --git a/assets/apifiletest/index.html b/assets/apifiletest/index.html deleted file mode 100644 index a0b5be0..0000000 --- a/assets/apifiletest/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Document - - - - -
- - -
- - diff --git a/assets/apifiletest/index.js b/assets/apifiletest/index.js deleted file mode 100644 index 7463aec..0000000 --- a/assets/apifiletest/index.js +++ /dev/null @@ -1,32 +0,0 @@ -document.getElementById("uploadButton").addEventListener("click", async () => { - const fileInput = document.getElementById("fileInput"); - const files = Array.from(fileInput.files); - - if (files.length === 0) { - alert("Please select some files first."); - return; - } - - const formData = new FormData(); - - formData.append("bounty_id", 7); - files.forEach((file) => { - formData.append("files", file); // Append each file to FormData - }); - - try { - const response = await fetch("http://localhost:5000/submit-solution", { - method: "POST", - body: formData, - }); - - if (!response.ok) { - throw new Error("Network response was not ok"); - } - - const data = await response.json(); - console.log("Upload successful:", data); - } catch (error) { - console.error("Error uploading files:", error); - } -});