I want to add more parameter like &tempUpload=true I have some logic in the server and it is working well. The only problem is that I want to remove the uploaded images if the user cancel the saving of the form data.
So, how do you know that the “user cancel the saving of the form data.”?
Try to catch this action from the suiting event and send the additional request with the additional custom parameter “cancel”/“abort”-like. get this parameter on your backend and remove the loaded icon for the specified user.
Blockquote
how do you know that the “user cancel the saving of the form data.”?
Simple if they close the window (form) then it means that the user cancelled or did not want to save the customer info. This time I want to send a request from server that the user aborted the operation so the pre-upload photo must be deleted.
[FIXED]
I was able to find a workaround here. I attached an event on the window (“onClose”) and if the user aborted the operation I send an ajax to the server so I can delete the pre-uploaded photo in the server.
[ISSUE #2]
What if the user close the browser or let say brownout.
[FIXED #2]
I created a script that will run every hour to check for the photo.
Mark this post closed. I found a workaround. The bad side is that I have to break my frameworks routing to in-ability to add custom data.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan