'reactjs: upload images show an alert when user tries to reload page and upload is not done yet
I have a reactjs web application , in one form I am sending up to 5 images to the backend , it takes a little bit of time to upload them . before all the images are uploaded if the user refresh the page or left the app the process is interrupted and canceled. I would like to add an extra step in case the user reloaded the page by mistake , I would like to show hin an alert saying " the upload in progress if you continue it will be canceled are you sure you want to continie " if he clicked yes then the upload will be cancelled and the page reloaded , if clicked no , no page reload and the process will continue. any idea how to implement it
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
