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

Returning Messages from Server

3 Answers 30 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 31 May 2017, 07:33 PM
I would like to return an error or status message from the server after a file is uploaded and processed based on the contents of the file.  Is there a way to send a message back to the onClientFileUploaded event handler without extending a custom handler for each upload control I want on my website?

3 Answers, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 05 Jun 2017, 08:41 AM
Hello Josh,

Sending custom messages from the server requires a Custom Handler for the AsyncUpload - AsyncUpload - Custom Http Handler online demo.

If you want to set the handler for all AsyncUpload controls, there are some approaches for achieving it: 
  • Wrapping the AsyncUpload in a UserControl.
  • Using ASP.NET Themes (similar implementation is used for the RadEditor demos, the Skin implementation can be found in the /App_Themes/Default folder of the Local demos);
  • Inheriting the AsyncUpload control;
  • Using a ControlAdapter;  

Regards, Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Josh
Top achievements
Rank 1
answered on 06 Jun 2017, 06:28 PM
That's not quite what I was going for.  My scenario is that I have several pages that each have an upload control that all process different files in different ways.  Some of them return messages, some don't.  Is there a way to return messages without having to write a separate upload module for each process?
0
Peter Milchev
Telerik team
answered on 09 Jun 2017, 07:19 AM
Hello Josh,

I am afraid that returning messages from the server requires Custom Handler and you should implement it to achieve the desired functionality. 

Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
AsyncUpload
Asked by
Josh
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Josh
Top achievements
Rank 1
Share this question
or