Fix function argument types for file upload (#939)

This commit is contained in:
Matt
2023-10-10 23:55:48 -04:00
committed by GitHub
parent 5f3b5d2f19
commit b37948cf5e
2 changed files with 8 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ const offlineUpdate = ref();
const openOfflineUpdatePrompt = () => {
offlineUpdate.value.click();
};
const handleOfflineUpdate = ({ files }: { files: FileList }) => {
const handleOfflineUpdate = (payload: Event) => {
useStateStore().showSnackbarMessage({
message: "New Software Upload in Progress...",
color: "secondary",
@@ -71,6 +71,9 @@ const handleOfflineUpdate = ({ files }: { files: FileList }) => {
});
const formData = new FormData();
if (payload.target == null || !payload.target?.files) return;
const files: FileList = payload.target.files as FileList;
formData.append("jarData", files[0]);
axios