2

In my application there is a functionality to upload a video file. if a user uploads a big video file and before uploading if he presses a cancel button just panel get closed but uploading process does not stops. I have used a function for stop the uploading process it works fine in Mozilla Firefox but it is not working in i.e (internet explorer) please help me ..

thanks in advance

3
  • Elaborate what you mean by "stop file upload" - client or server? Commented Apr 30, 2012 at 11:44
  • Client side or server side or both? Commented Apr 30, 2012 at 11:47
  • function cancelUpload() { isUploadCanceled = true; $find('<%=modalpopupvideo.ClientID%>').hide(); var up = document.getElementById('<%=flpvideo.ClientID%>'); up.setAttribute("type", "input"); up.setAttribute("type", "file"); if (window.stop) { window.stop(); } document.getElementById('myHiddenDiv').style.display = 'none'; } Commented Apr 30, 2012 at 13:16

2 Answers 2

1

I don't think we can stop uploading file if it once started , the only way to stop it before starting only.

However you can look at similar discussion on below link

http://forums.asp.net/t/1303246.aspx/1

Sign up to request clarification or add additional context in comments.

Comments

0

You can try with this:

Well, there is probably a much better way to do it but I have found that this stops it (if you can live with the redirect back to the page):

FileUpload1.FileContent.Dispose()
Response.Redirect("http://localhost/somesite/Default.aspx")

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.