diff --git a/js/components/ascribe_uploader/react_s3_fine_uploader.js b/js/components/ascribe_uploader/react_s3_fine_uploader.js index b9ef09fc..9d60e3ba 100644 --- a/js/components/ascribe_uploader/react_s3_fine_uploader.js +++ b/js/components/ascribe_uploader/react_s3_fine_uploader.js @@ -163,6 +163,13 @@ var ReactS3FineUploader = React.createClass({ } }, + componentWillUnmount() { + // Without this method, fineuploader will continue to try to upload artworks + // even though this component is not mounted any more. + // Therefore we cancel all uploads + this.state.uploader.cancelAll(); + }, + propsToConfig() { let objectProperties = this.props.objectProperties; objectProperties.key = this.requestKey;