React native uses react native image picker to upload pictures

in react native, I use the uri returned in react native image picker to upload the image to Qiniuyun. The url opening of the image returned by the downloaded api on Qiniuyun is a text file upload code: `/ / upload
const upload = async (file, token) = > {

const formData = new FormData();

formData.append("token", token);
formData.append("file", file);
const key = await fetch(env.api.QINIUUP_URL, {
    method: "POST",
    headers: {
      "content-Type": "multipart/form-data",
    },
    body: formData,
  })
  .then(response => (response.json()))
  .catch(error => {
      console.log(error);
  });

return key;

}; `
file is the local image address returned by react-native-image-picker

Qiniuyun downloads the api of url and returns the url open text file as shown in the following figure

the picture can be opened on the computer simulated uploaded by postman
I hope I can open url to see the picture

Menu