[ReactNative] Allow uploading native files (e.g. photos) and FormData via XMLHttpRequest

This commit is contained in:
Nick Lockwood
2015-06-09 12:25:24 -07:00
parent f590a8b15b
commit f4bf80f3ea
13 changed files with 513 additions and 138 deletions

View File

@@ -102,6 +102,7 @@ function setUpXHR() {
// The native XMLHttpRequest in Chrome dev tools is CORS aware and won't
// let you fetch anything from the internet
GLOBAL.XMLHttpRequest = require('XMLHttpRequest');
GLOBAL.FormData = require('FormData');
var fetchPolyfill = require('fetch');
GLOBAL.fetch = fetchPolyfill.fetch;