internet explorer - jquery file upload - IE callback results in object Object -


However, there is already this question out there:

However, I am coming to the same issue and do not know how to solve it I had some working code that (based on recommendation in other posts) looked like this:

  if (. $ Fn.wl_File) $ .fn.wl_File.defaults = {forceIframeTransport: true, onDone: function (e, data) {var results = jQuery.parseJSON (data.result); Var filename = Result [0] .name; }}   

Which removes completely callback information in Firefox, Chrome, etc. except for IE However, I still get an [object object] from IE. I get the following results back when I do a console.log (data.result) in Chrome:

  [{"Name": "1_3266_671641333369_14800358_42187036_5237378_n.jpg", "Size": 35,535, "type": "image \ / jpeg", "url": "\ / web \ / upload \ /1_3266_671641333369_14800358_42187036_5237378_n.jpg", "thumbnail_url ":" \ / Web \ upload / thumbnail \ / 1_3266_671641333369_14800358_42187036_5237378_n.jpg "\ / web \ /upload.php? File = 1_3266_671641333369_14800358_42187036_5237378_n.jpg "," deleted type ":" delete "," upload-type ":" video_montage "," insert_id ":" 288 "}]   

I do not know How to solve this issue. Based on my code, can someone tell me in the right direction?

FYI, I am using the following topic: which tells jquery upload plugin and this The reason that my code looks a bit different on top is basically the same as the plugin code.

Any help this disappointing issue I have mentioned in my own question that I got the solution.

However, I had to extend a bit for this to satisfy different browsers. The original answer was correct about receiving data from IE, but that method did not work for other browsers. I had to add a statement that To see if my browser type is Security was and proceed from there. My code to handle this scenario looks like the following:

  if ($. Browser.msm) {var data_to_parse = $ ('pre', data.result) .text (); } And {var data_to_parse = data.result; } Var Results = jQuery.parseJSON (data_to_parse); Var filename = Result [0] .name;   

Now I can manipulate the response from both IE and other browsers!

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -