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

Setting the Accept request header on Upload control

3 Answers 170 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 27 Aug 2012, 02:16 PM
The default HTTP Accept request header used by the Upload control appears to be: "text/html,application/xhtml+xml,application/xml". I'd like to be able to set that to "application/json" instead. Is that possible?


-Ryan

3 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 29 Aug 2012, 07:12 AM
Hello,

I'm posting the reply to your ticket for community reference.

The Accept header can't be set in browsers that do not support the HTML5 File API.

If the WebAPI service is in your control you might get away by replacing the content negotiator with your own. This will allow you to use a query string parameter to select the response type.

Kind regards,
Tsvetomir Tsonev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
danparker276
Top achievements
Rank 2
answered on 11 Jul 2014, 08:22 PM
I know this is an old post, but is there a full example of using the upload with WebAPI? 
0
Dimiter Madjarov
Telerik team
answered on 16 Jul 2014, 08:04 AM
Hello Dan,


You could take a look at the attached project, which demonstrates a sample implementation of Kendo UI Upload with WebAPI.

I wish you a great day!

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Upload
Asked by
Ryan
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
danparker276
Top achievements
Rank 2
Dimiter Madjarov
Telerik team
Share this question
or