send the upload callback to http service on file upload
This commit is contained in:
parent
9cdf56be39
commit
5fbfd3ab5b
|
@ -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}>
|
||||
|
|
Loading…
Reference in New Issue