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

Return response failing

2 Answers 123 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Vivek
Top achievements
Rank 1
Vivek asked on 23 Apr 2012, 09:51 AM
Hi,
My save handler generates JSON correctly (PHP code used to generate the JSON below). but I still get an upload error. The actual file is uploaded successfully.
$var_OutputArray = array('attachid'=>$attachment->AttachmentID, 'mod'=>$attachment->ModuleCode,'tic'=>$attachment->Type);
header('Content-type: text/plain');
echo json_encode($var_OutputArray);

An example of JSON output which generates the error is
{"attachid":"labgh3v1din96yfk","mod":"prj","tic":"ticket"}

2 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 24 Apr 2012, 02:24 PM
Hello,

Everything seems fine with the server response. That said, a Fiddler capture will be appreciated as it will ensure that we're not missing something.

What happens if you try to request the handler using $.getJSON()?

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
Vivek
Top achievements
Rank 1
answered on 25 Apr 2012, 07:54 AM
As it turns out, the problem was in the error handler. It's solved now ... thanks!
Tags
Upload
Asked by
Vivek
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Vivek
Top achievements
Rank 1
Share this question
or