How to use the react-native-background-upload.cancelUpload function in react-native-background-upload

To help you get started, we’ve selected a few react-native-background-upload examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Vydia / ReactNativeBackgroundUploadExample / js / components / Upload.js View on Github external
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 })
    })
  }

react-native-background-upload

Cross platform http post file uploader with android and iOS background support

MIT
Latest version published 2 years ago

Package Health Score

60 / 100
Full package analysis