Last active
October 30, 2023 17:37
-
-
Save anon767/f8afdeddedf249c221fe4233450a53ff to your computer and use it in GitHub Desktop.
API Call to securewoof
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<input id="fileupload" name="fileupload" type="file" value="" /> | |
</html> | |
async function uploadFile() { | |
let formData = new FormData(); | |
formData.append("file", fileupload.files[0]); | |
const response = await fetch('https://antivir.securewoof.com', { | |
method: "POST", | |
body: formData | |
}); | |
const data = await response.json() | |
if (data.error) { | |
console.log("error"); | |
} else if (data.prediction) { | |
console.log(data.prediction); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment