Re: How to detect a cancel upload event

  •  03-23-2012, 10:35 AM

    Re: How to detect a cancel upload event

    Thanks for replying Ken.
     
    I'm not a hardcore web developer, so I'm trying to translate what you've got to MVC3 / Razor which is what I'm using.  Please forgive me if I misunderstand :)
     
    It looks like you're capturing the cancel button event on the client side in javascript.  What I need is to know when the cancel button is clicked in the upload provider - on the server side.  My upload provider has access to a singleton class which is holding open resources like datastreams and sql connections.  I need to be able to release those resources if a cancel event is triggered.  Is some callback, whether to the provider or the upload handler ashx page which says "This upload was cancelled, please delete the temp file"?
     
    I can capture the event on the client side, so I suppose I could do it with a form post from the javascript code if I absolutely had to, but that seems like a bad design.
     
    Thanks again,
     
    --Mike
View Complete Thread