filestack / filestack-react

Official React component for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
https://www.filestack.com
MIT License
164 stars 40 forks source link

Cancel upload when modal not visible #128

Open deblina-pattanayak opened 2 years ago

deblina-pattanayak commented 2 years ago

As far as I know, there are 2 ways to cancel an ongoing upload

  1. cancel from the visible modal
  2. if using client.upload, then use the token param

But, there seems to be no way to cancel an upload if the modal has been hidden using hideModalWhenUploading to show a custom render. The only method exposed during custom render is onPick. For more clarification, I would like to trigger an upload cancel during this stage using the tiny cross button.

image

Is there any way to cancel an upload for the above condition? If not, are there any plans to expose more functions to the custom render prop?