From 5fbfd3ab5b8db04a8b5cce684dea11bdb85a71ae Mon Sep 17 00:00:00 2001 From: jasquat Date: Wed, 3 Aug 2022 17:04:57 -0400 Subject: [PATCH] send the upload callback to http service on file upload --- src/components/FileInput.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/components/FileInput.tsx b/src/components/FileInput.tsx index 6d3d09c..0f1f3a4 100644 --- a/src/components/FileInput.tsx +++ b/src/components/FileInput.tsx @@ -33,18 +33,12 @@ export default class FileInput extends React.Component { formData.append('fileName', this.fileInput.current.files[0].name); HttpService.makeCallToBackend({ path: url, - successCallback: this.processSubmitResult, + successCallback: this.onUploadedCallback, httpMethod: 'POST', postBody: formData, }); } - processSubmitResult(_result: any) { - if (this.onUploadedCallback) { - this.onUploadedCallback(); - } - } - render() { return (