jQuery UI Widgets › Forums › General Discussions › Editors › FileUpload › Server responce wrapped by HTML and missing status
Tagged: angular fileupload, bootstrap fileupload, javascript fileupload, jquery fileupload, jqwidgets fileupload, jqxFileUpload
This topic contains 3 replies, has 2 voices, and was last updated by Hristo 9 years, 9 months ago.
-
Author
-
Hello I’m trying to handle server response which in my case is a JSON string with some additional information.
Unfortunately the event.args.response contains my expected response string wrapped with some HTML codeFor example I was expecting:
‘{“bp”:”2″,”contentType”:”image\/png”,”fileName”:”works-on-my-machine-starburst.png”,”size”:30255}’
but response is:
‘<pre style=”word-wrap: break-word; white-space: pre-wrap;”>{“bp”:”2″,”contentType”:”image\/png”,”fileName”:”works-on-my-machine starburst.png”,”size”:30255}’Is this intentional or a bug ?
Also whichever HTTP response status I set in my server side it seems to be ignored and nowhere visible I’d like to know if it was HTTP OK 200 or not.
Hello Miroslaw Stein,
Please taka a look our article in section ‘integration’ from Documentation about one concrete technology you use.
For example in this article especially focused on this.Context.Response.ContentType to set how to visualize.
Another way to avoid this is with take only text (without html tags) and after this parsed.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comFollowing the article sample I’ve specified content type as “text/html” and it has actually prevented wrapping. However it seems not right to wrap all other content by default – especially “application/json” which I should use to make my content and content type consistent.
I still have no info on HTTP response status.
Regards,
M.SteinHello Miroslaw Stein,
About “HTTP response status” unfortunately, this feature is not available to jqxFileUpload.
Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.