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

Trying to test OnClientFileUploadFailed with RadAsyncUpload

1 Answer 193 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 28 Jul 2015, 02:43 AM

This might sound like an odd request for help; Trying to make it fail.  :-)

I have an AsyncUpload control that I need to make fail temporarily.

I've tried to switch off my network card (wifi) halfway through the upload but I just get a console error:

 

POST http://myDomain.localhost/Telerik.Web.UI.WebResource.axd?type=rau 
net::ERR_INTERNET_DISCONNECTED​

I would have thought this would cause the OnClientFileUploadFailed event fire, but it doesn't.  The progress bar stays and just the console error message is shown.

Telerik control version : 2015.1.225.40

Chrome version : 44.0.2403.107 m

 

Any suggestions would be very much appreciated.  For either how to get the event to fire or why the OnClientFileUploadFailed event doesn't fire.

Thanks

1 Answer, 1 is accepted

Sort by
0
Aneliya Petkova
Telerik team
answered on 29 Jul 2015, 04:02 PM
Hi Adam,

The RadAsyncUpload's OnClientFileUploadFailed event basically fires when an error uploading the selected file has occurred. Common reason for this event firing is Telerik.Web.UI.WebResource.axd handler not being registered in the web.config. Another reason might be server-side error in custom upload handler is being used.

For example if you disable the chunk upload and try to upload larger file, the error will be thrown.

Attached is a sample project where you can test this.

Another way is to set ChunkSize="5242880", which is 5 MB. The default value of maxRequestLength property is 4MB. So if you try to upload 5MB at a time, the event will be thrown.

Hope this will be helpful.

Regards,
Aneliya Petkova
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
AsyncUpload
Asked by
Adam
Top achievements
Rank 1
Answers by
Aneliya Petkova
Telerik team
Share this question
or