Good afternoon,
I am currently using the asynchronous uploader component with property 'multiple' set to false, such that I can only upload one file at a time in this component.
A business requirement is that when a new file is selected (either through 'Browse' or by dragging the document into the draggable area) and the uploader already holds an uploaded file, the user should receive a confirmation dialog. If they choose 'keep original file', the original file should be kept and the new file should not be uploaded.
I can cancel the new upload through overriding the 'fileSelected' event. However, I do not seem to be able to keep the original file, as it is always deleted from the filelist no matter which option is picked in the dialog. The 'removing' event is never triggered so I can not use this event to prevent this.
Is there any way to implement this requirement?
Thanks for your time.
Hello Berly,
Thank you for your answer. Unfortunately the answer does not solve our issue.
I was already able to show a confirmation dialog, but the issue was that the old file is already deleted when I trigger the 'onFileSelected' event of the new file.
I think the answer to this problem lies in making sure that the removal of the old file is triggered in such a way that the 'removing' event is fired correctly, just like when a user manually removes a file. Once this is done, I can correctly override this event and make sure the event is cancelled when appropriate.
Can you please elaborate on whether it is possible to implement this solution?
Thanks for your time.
Regards,
Alma