1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 01:25:17 +01:00

fix fineuploader issue after unmounting react-s3-fineuploader

This commit is contained in:
Tim Daubenschütz 2015-07-14 20:10:41 +02:00
parent 18898b6f8a
commit 6a04a1a053

View File

@ -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;