ios – file:/// url does not work in FormData [React Native]


In my react-native app once I take an image utilizing react-native-vision-camera or resize a picture by way of expo-image-manipulator, I obtained the next url for the ultimate file/picture:


Then I create a FormData to add the supply by way of axios:

  formData.append(title, {
    uri:"file://", ""),
    kind: "picture/png",
    title: "filename.png",

Notice that I exchange file:// within the url, as many solutions each right here and on GitHub mentioned.


  axios.publish(url, formData, {
    headers: {
      Authorization: "Token ...",
      "Content material-Sort": "multipart/form-data",
    transformRequest: (formData) => formData,

And it does not work, the picture is not uploaded on the backed, if I attempt to print the shape knowledge too there isn’t any photos inside.

Notice: each picture/png or picture/jpg do not work.

Does somebody have had the identical difficulty?


Leave a Reply

Your email address will not be published. Required fields are marked *