How can I check if the browser support HTML5 file upload (FormData object)?

后端 未结 7 1939
离开以前
离开以前 2020-12-08 04:38

How can I check if the browser support HTML5 file upload (FormData object)?

var fd = new FormData();

Following the answer from this post, b

7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-08 05:10

      function supportFormData() {
         return !! window.FormData;
      }
    

    Source: https://www.new-bamboo.co.uk/blog/2012/01/10/ridiculously-simple-ajax-uploads-with-formdata/

提交回复
热议问题