Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cancelUpload = () => {
if (!this.state.uploadid) {
console.log('Nothing to cancel!')
return
}
Upload.cancelUpload(this.state.uploadId).then((props) => {
console.log(`Upload ${this.state.uploadId} canceled`)
this.setState({ uploadId: null, progress: null })
})
}