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

How to get Server Response

1 Answer 349 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 21 Aug 2019, 02:21 PM

Hi,

our upload impl:

<kendo-upload #kendoUpload
                  [saveUrl]="uploadImageUrl"
                  [removeUrl]="'uploadRemoveUrl'"
                  [autoUpload]="false"
                  (select)="onSelectFileToUpload($event)"
                  (complete)="onUploadCompleted($event)"
                  (uploadProgress)="uploadProgressEventHandler($event)">
                </kendo-upload>

 

as you can see, i have no idea for what removeUrl is good for. But this is not my question atm.

If upload fails and Server returns 500, the selected file gets a red color in the ui, thats fine.

But we need to extract the server response and display it for user information.

How can we get Serverresponse and HttpStatusCode ?

Kind regards
David

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 21 Aug 2019, 03:28 PM
Hello Christian,


You could attach a handler to the error event of the Upload component, which contains the information about the specific server response.

https://www.telerik.com/kendo-angular-ui/components/upload/api/ErrorEvent/

Regards,
Dimiter Madjarov
Progress Telerik
Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Upload
Asked by
Robert
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or