send the upload callback to http service on file upload

This commit is contained in:
jasquat 2022-08-03 17:04:57 -04:00
parent 9cdf56be39
commit 5fbfd3ab5b
1 changed files with 1 additions and 7 deletions

View File

@ -33,18 +33,12 @@ export default class FileInput extends React.Component<Props> {
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 (
<form onSubmit={this.handleSubmit}>