This is a migrated thread and some comments may be shown as answers.

CancelUpload (Issue ID 2997) doesn't appear to be fixed

7 Answers 57 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Terry
Top achievements
Rank 1
Terry asked on 08 Sep 2010, 04:19 PM
Issue ID 2997 - Upload: Upload cannot be cancelled in the UploadStarting handler does not appear to have been fixed in the latest release.

I just upgraded to SP1 (2010.2.812.1040) and if I try to call the CancelUpload method in the UploadStarting event I still get the Object reference error.

Also, if I move the CancelUpload call to the UploadStarted event, it will cancel the upload, but leave the control in an uninitialized state. The file that was being uploaded will be cleared and the Browse button will be back, but the caption will remain as the "UploadCaptionUploading" text.  Then if you click the browse button again, it will allow you to view a file list to select, but when you select a file it will give an Object reference error again.

7 Answers, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 13 Sep 2010, 02:28 PM
Hi Terry,

It was fixed  before 2 weeks and the fix is not present in the Sp1 release. You can get the Latest internal build and check if it is ok there. Or you can wait a couple of days and get the SP2 release, that will contain the fix.
Sorry for any inconvenience.

Sincerely yours,
Miro Miroslavov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Bryan Johnson
Top achievements
Rank 1
answered on 28 Sep 2010, 03:34 PM
Hi,

I am also having this exact problem.  I just updated the controls to the version 2010_2_0924 and the problem still occurs.  I too want to cancel the upload based on certain validation.  Ideally, I really want to just cancel the action of the user pressing the upload button so that the file they selected is still present.  Is there a way of doing this?

Thanks,
Bryan
0
Alex Fidanov
Telerik team
answered on 01 Oct 2010, 02:18 PM
Hello Bryan Johnson,

Thank you for reporting this to us. I have already resolved this issue and have made the FileUploadStarting event a RoutedEvent. It can be handled by setting the e.Handled=true; which will not trigger the uploading process and will keep the SelectedFiles in the RadUpload.

These changes will be available with the beta of Q3.

Kind regards,
Alex Fidanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Bryan Johnson
Top achievements
Rank 1
answered on 15 Oct 2010, 06:18 PM
I upgraded the control to the 1008 version and the e.Handled does work, but now the IsMultiselect property does not work - the radupload is always in multiselect mode regardles of whether the property is set to true or false.  Also, when using e.Handled from within the FileUploadStarting event, the upload will be canceled but the header for the control does not get reset to 'Select files to upload', it is just blank.

Any ideas on this?

Bryan
0
Alex Fidanov
Telerik team
answered on 19 Oct 2010, 08:00 AM
Hi Bryan Johnson,

No changes were made on the OpenFileDialog and I am not sure why you are seeing this behavior with the IsMultiSelect, however, I tested this with the latest binaries and it works correctly. Thank your for reporting the caption string issue. I have already resolved it and it will be included in the upcoming builds.

Regards,
Alex Fidanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Terry
Top achievements
Rank 1
answered on 06 Nov 2010, 07:51 PM
I downloaded the lastest internal build (2010.2.1029.35) and when I set e.Handled to true in the FileUploadStarting event it generated a System.InvalidOperationException error.

   at Telerik.Windows.RadRoutedEventArgs.set_Handled(Boolean value)
   at Contests.MainPage.PictureUploadStarting(Object sender, FileUploadStartingEventArgs e)
   at Telerik.Windows.RadRoutedEventArgs.set_Handled(Boolean value)
   at Contests.MainPage.PictureUploadStarting(Object sender, FileUploadStartingEventArgs e)
   at Telerik.Windows.RadRoutedEventArgs.set_Handled(Boolean value)
   at Contests.MainPage.PictureUploadStarting(Object sender, FileUploadStartingEventArgs e)

0
Alex Fidanov
Telerik team
answered on 10 Nov 2010, 01:48 PM
Hi Terry,

I was not able to reproduce this with our latest internal builds. Some changes were made around this event. Please test this again with the Q3 release, which is just around the corner and let us know if you still have this exception thrown.

Greetings,
Alex Fidanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Upload
Asked by
Terry
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
Bryan Johnson
Top achievements
Rank 1
Alex Fidanov
Telerik team
Terry
Top achievements
Rank 1
Share this question
or