jQuery UI Widgets › Forums › Editors › FileUpload › File Upload – Internet Explorer
Tagged: Angular file upload, download, download server response, File Upload, ie, Internet Explorer, jquery file upload, jqxFileUpload, json, server response
This topic contains 3 replies, has 2 voices, and was last updated by Dimitar 7 years ago.
-
Author
-
Hello,
I have successfully implemented JQXFileUpload using Google Chrome, but when testing with IE I noticed an error. When it begins uploading (“uploadStart”), IE prompts the user for a file download containing the JSON response.
I’ve googled this issue, but many solutions are relating to AJAX calls and changing the contenttype to text/html. So in my WFC method I have added this code:
JavaScriptSerializer js = new JavaScriptSerializer(); string resp = "File was uploaded successfully"; string strJSON = js.Serialize(resp); postedContext.Response.ContentType = "text/html; charset=utf-8"; postedContext.Response.Write(strJSON);
however it still does not work, as it still tries to download this response. The “uploadEnd()” method is never reached, because as soon as my WCF method returns the response, IE tries to download it as a file.
Has anyone else encountered this issue with JQXFileUpload, and is there a solution besides scrapping JQWidgets and using manual AJAX call?
Hello iLoveJQWidgets,
I do not think this issue is directly related to jqxFileUpload. What the widget does is create hidden forms with file inputs and submit them to the specified uploadUrl. However, I found a Stack Overflow topic that may offer a solution on the matter: http://stackoverflow.com/a/2492211/2442648 (you may have already seen it, though).
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Hi,
Thank you for your response. However I have seen that solution, and it is not feasible to update the registry on several client machines in order to bypass this for internet explorer.
Hi iLoveJQWidgets,
Could you, please, share if this issue occurs if you are not using jqxFileUpload, but a simple
<input type="file" />
inside a form?Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.