From e4603459fb66b5d511a1d69b0c1212aa4b97117f Mon Sep 17 00:00:00 2001 From: John Coburn Date: Thu, 5 Oct 2023 05:33:41 -0500 Subject: [PATCH] fetch newest upload definitions instead of depending on context --- .../UploadingJobsDisplay/UploadingJobsDisplay.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/UploadingJobsDisplay/UploadingJobsDisplay.js b/src/components/UploadingJobsDisplay/UploadingJobsDisplay.js index b9f64ae45..64d313e24 100644 --- a/src/components/UploadingJobsDisplay/UploadingJobsDisplay.js +++ b/src/components/UploadingJobsDisplay/UploadingJobsDisplay.js @@ -89,7 +89,7 @@ export class UploadingJobsDisplay extends Component { actionMenuItems: ['run'], }; - async componentDidMount() { + componentDidMount() { this.mounted = true; this.fileRemovalMap = { [FILE_STATUSES.DELETING]: this.deleteFileAPI, @@ -100,8 +100,7 @@ export class UploadingJobsDisplay extends Component { this.setPageLeaveHandler(); this.mapFilesToState(); if (this.state.configurationLoaded) { - await this.uploadJobs(); - this.updateJobProfilesComponent(); + this.handleUploadJobs(); } } @@ -245,8 +244,9 @@ export class UploadingJobsDisplay extends Component { } } - multipartUpload() { - const { uploadDefinition } = this.context; + multipartUpload = async () => { + const { updateUploadDefinition } = this.context; + const uploadDefinition = await updateUploadDefinition(); const { files } = this.state; const { okapiKy, intl } = this.props; this.currentFileUploadXhr = new MultipartUploader(