What is the best way to check for XHR2 file upload support? What is the best way to check for XHR2 file upload support? javascript javascript

What is the best way to check for XHR2 file upload support?


if (new XMLHttpRequest().upload) {  // welcome home!} else {  // not supported}