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

Upload successful, but treated as failure because response is not empty

2 Answers 114 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 21 Nov 2012, 01:13 AM
We are using Kendoui on a project to rewrite an existing Adobe Flash UI in HTML 5. Initial results are very promising. However, the Upload component treats HTTP 200 OK as an error if the response is not empty, but the file has actually uploaded successfully. Since we have other client code that uses the same server to upload files, we are not able to change the server to send an empty response. Is there a way to configure a response handler to validate the response or simply treat HTTP 200 OK as success regardless of the response?

2 Answers, 1 is accepted

Sort by
0
Eliezer
Top achievements
Rank 1
answered on 12 Jan 2013, 04:14 PM
I was with the same problem. If the server return a answer with text or html we get this error. But if the answer is a JSON object the error stop to happen. It's just a tip in case of you dont find any solution.
0
Jeff Kershner
Top achievements
Rank 1
answered on 10 Mar 2013, 05:50 AM
I found the same issue.  I am using PHP and returning this worked:

print(json_encode($rows));

Tags
Upload
Asked by
Jim
Top achievements
Rank 1
Answers by
Eliezer
Top achievements
Rank 1
Jeff Kershner
Top achievements
Rank 1
Share this question
or