Hi,
A change in the RadUpload component between Q1 and Q2 release has broken some functionality in my application:
My app handles the RadUpload.UploadCanceled event, where I check if *any* of the files were uploaded succesfully before the user clicked cancel:
This code works just fine in Q1, but in Q2, CurrentSession.UploadedFiles.Count is *always' zero regardless of how many files were uploaded prior to clicking 'cancel'.
I have compared the Q1 and Q2 RadUpload components using Reflector, and have found a change in Q2 that resets the RadUpload session *before* raising the UploadCanceled event:
Q1 code:
Q2 code:
Note the new call to this.CurrentSession.Reset(), this is whats causing me problems! I can work around this by manually tracking how many files have successfully been uploaded, but this smells like a bug to me. Or perhaps you need to add an 'UploadCanceling' event, to be raised prior to 'UploadCanceled', where the session info would still be intact.
A change in the RadUpload component between Q1 and Q2 release has broken some functionality in my application:
My app handles the RadUpload.UploadCanceled event, where I check if *any* of the files were uploaded succesfully before the user clicked cancel:
private void RadUpload1_UploadCanceled(object sender, EventArgs e) |
{ |
if (RadUpload1.CurrentSession.UploadedFiles.Count > 0) |
{ |
//some files *did* upload succesfully, so do something... |
} |
} |
This code works just fine in Q1, but in Q2, CurrentSession.UploadedFiles.Count is *always' zero regardless of how many files were uploaded prior to clicking 'cancel'.
I have compared the Q1 and Q2 RadUpload components using Reflector, and have found a change in Q2 that resets the RadUpload session *before* raising the UploadCanceled event:
Q1 code:
public void CancelUpload() |
{ |
if (this.CurrentSession.uploaders.Count > 0) |
{ |
this.CurrentSession.uploaders.Peek().Cancel(); |
} |
this.SetInitialUIState(); |
} |
Q2 code:
public void CancelUpload() |
{ |
if (this.CurrentSession.Uploaders.Count > 0) |
{ |
this.CurrentSession.Uploaders.Peek().Cancel(); |
} |
this.CurrentSession.Reset(); |
this.SetInitialUIState(); |
} |
Note the new call to this.CurrentSession.Reset(), this is whats causing me problems! I can work around this by manually tracking how many files have successfully been uploaded, but this smells like a bug to me. Or perhaps you need to add an 'UploadCanceling' event, to be raised prior to 'UploadCanceled', where the session info would still be intact.