文件上传反应原生到PHP服务器

我在react-native-ios中实现文件上传,这是我在react-native js上的代码:

const formData = new FormData(); formData.append('photo', { uri: image.sourceURL, name: image.filename, type: 'image/jpeg' }); // here is my formdata console :{uri: "file:///Users/.../DCIM/100APPLE/IMG_0002.JPG", name: "IMG_0002.JPG", type: "image/jpeg"} fetch('services.php?action=MultiplefileUpload',{ method: 'POST', headers: { 'Content-Type': 'multipart/form-data', 'Accept': 'application/json' }, body: formData }).then((response) => response.json()) .then((responseJson) => { console.log(responseJson); }) .catch((error) => { console.error(error); }); 

在php页面上我写道: return $_FILES响应来的是: photo: {name: "IMG_0002.JPG", type: "", tmp_name: "", error: 1, size: 0}

在我的代码中,我在哪里做错了? 我也阅读了这个链接:将图像文件从react-native上传到php服务器