{"id":6,"date":"2014-01-27T15:48:00","date_gmt":"2014-01-27T09:48:00","guid":{"rendered":"http:\/\/promincproductions.com\/blog\/?p=6"},"modified":"2014-05-03T09:08:53","modified_gmt":"2014-05-03T03:08:53","slug":"all-browser-compatible-ajax-file-upload-that-works-on-mobile-as-well","status":"publish","type":"post","link":"https:\/\/promincproductions.com\/blog\/all-browser-compatible-ajax-file-upload-that-works-on-mobile-as-well\/","title":{"rendered":"All Browser Compatible AJAX File Upload that works on Mobile as Well"},"content":{"rendered":"<p>Sadly an AJAX File Upload method that is all browser compatible (IE7\/8+) and that works on mobile doesn&#8217;t and can&#8217;t exist.<\/p>\n<p>My research shows there is a security issue with this being possible.<\/p>\n<p>There are many solutions out there that use Flash (yuck!) like Uploadify (doesn&#8217;t work on mobile).<\/p>\n<p>I&#8217;m finding that XHR2 works as a solution for this scenario, however it is not browser compliant. &nbsp;IE didn&#8217;t pick it up till IE10, so sadly this will not be a solution for some time to come&#8230;. &nbsp;<a href=\"http:\/\/caniuse.com\/xhr2\" data-lasso-id=\"23\">http:\/\/caniuse.com\/xhr2<\/a><\/p>\n<p>So what&#8217;s a crafty developer to do?<\/p>\n<p>What my research has lead to is that iFrames need to be used to mimic the AJAX feel. &nbsp;From a usability standpoint, the user could care less as you still built something that is operating how they would expect it to function.<\/p>\n<p>I have looked at many solutions for this problem over a long drug out amount of time&#8230; and my research has found a lot of dead ends, ugly code, inflated attempts, etc. &nbsp;BUT, I came across this solution today and so far I&#8217;m quite pleased with how this is put together.<br \/><a href=\"http:\/\/www.ajaxf1.com\/tutorial\/ajax-file-upload-tutorial.html\" data-lasso-id=\"24\">http:\/\/www.ajaxf1.com\/tutorial\/ajax-file-upload-tutorial.html<\/a><br \/>It is an iFrame solution, but it simply works. &nbsp;:) &nbsp;The amount of code is strikingly little, it&#8217;s browser compliant, it&#8217;s simple to setup, and the tutorial was well written and easy to follow.<\/p>\n<p>This will work well for today&#8217;s project, and is going to be a HUGE help on a future master-scheme I&#8217;ve got working up in my head&#8230;. &nbsp;now on to world domination! &nbsp;muwaha!<\/p>","protected":false},"excerpt":{"rendered":"<p>Sadly an AJAX File Upload method that is all browser compatible (IE7\/8+) and that works on mobile doesn&#8217;t [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[12],"tags":[],"class_list":["post-6","post","type-post","status-publish","format-standard","hentry","category-javascript-jquery"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4BbcR-6","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/6","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/comments?post=6"}],"version-history":[{"count":1,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/6\/revisions"}],"predecessor-version":[{"id":40,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/6\/revisions\/40"}],"wp:attachment":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/media?parent=6"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/categories?post=6"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/tags?post=6"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}