使用React Native中的codeIgniter api在服务器上上载和编辑图像

使用React Native中的codeIgniter api在服务器上上载和编辑图像,api,react-native,codeigniter,Api,React Native,Codeigniter,无法将图像从react本机代码上载到PHP codeIgniter服务器,但是使用postman上载图像时没有任何问题,其他数据可以编辑,但图像无法从react本机应用程序上载。因此,请告诉我问题出在哪里 import React from "react"; import ProgressLoader from "../components/ProgressLoader"; import ImagePicker from "react-native-image-picker"; export

无法将图像从react本机代码上载到PHP codeIgniter服务器,但是使用postman上载图像时没有任何问题,其他数据可以编辑,但图像无法从react本机应用程序上载。因此,请告诉我问题出在哪里

import React from "react";
import ProgressLoader from "../components/ProgressLoader";
import ImagePicker from "react-native-image-picker";

export default class ProfileContainer extends React.PureComponent {
  constructor(props) {
    super(props);
  }
  updateProfile() {
        const data = new FormData();
        data.append("user_id", parseInt(userObj.UserID) || 0);
        if (
          this.state.ImageSource != undefined &&
          this.state.ImageSource != null &&
          this.state.ImageSource != "" 

        ) {
          const fileType = "jpg";
          data.append("image",JSON.stringify({
            uri: this.state.ImageSource,
            name: `testPhotoName.${fileType}`,
            type: `image/${fileType}`
          }));
        }
        data.append("token", userObj.PhoneNumber);
        data.append("first_name", "" + this.state.firstName);
        data.append("last_name", "" + this.state.lastName);
        data.append("password", "1234");
        data.append("notification", this.state.isNotification ? "1" : "0");


        alert("with edit Profile Data------>"+JSON.stringify(data));

        fetch('http://freshnme.shreeduttply.com/v1/api/editProfile', {
            method: 'POST',
            headers: {
              'Accept': 'application/json',
              'Content-Type': 'multipart/form-data'
            },
            body: data })
          .then((response) => response.json())
          .then((responseJson) => {
              alert("After Called Api response:  " + JSON.stringify(responseJson));
          })
          .catch((error) => {
              console.error(error);
          });```

你能在这里显示codeigniter代码吗?在这里引用之前,你能在这里显示codeigniter代码吗