Closed
Description
Might not be a bad idea to add to the readme...
https://github.com/facebook/react-native/blob/master/Libraries/Network/FormData.js#L29
Polyfill for XMLHttpRequest2 FormData API, allowing multipart POST requests
with mixed data (string, native files) to be submitted via XMLHttpRequest.
Example:
var photo = {
uri: uriFromCameraRoll,
type: 'image/jpeg',
name: 'photo.jpg',
};
var body = new FormData();
body.append('authToken', 'secret');
body.append('photo', photo);
body.append('title', 'A beautiful photo!');
xhr.open('POST', serverURL);
xhr.send(body);
Metadata
Metadata
Assignees
Labels
No labels