Added the possibility to do something when user asks to stop attachment upload