title: react native upload image as a file
body: <p>I am having trouble uploading an image from my react native app. I have a react app that uploads images to the backend using <code>&lt;input&gt;</code> as a file.</p>
  
  <p>The web app uploads to the backend like </p>
  
  <pre><code>File {name: "413_loveis_takingcareofu_wm.jpg", lastModified: 1503889026000, lastModifiedDate: Mon Aug 28 2017 10:57:06 GMT+0800 (HKT), webkitRelativePath: "", size: 34534, …}
  lastModified
  :
  1503889026000
  lastModifiedDate
  :
  Mon Aug 28 2017 10:57:06 GMT+0800 (HKT) {}
  name
  :
  "413_loveis_takingcareofu_wm.jpg"
  size
  :
  34534
  type
  :
  "image/jpeg"
  </code></pre>
  
  <p>I am getting the image on the React Native mobile app using react-native-image-picker and I have the base64 and filepath.</p>
  
  <p>How can I convert the filepath from </p>
  
  <pre><code>"file:///Users/kel/Library/Developer/CoreSimulator/Devices/7FAC36F6-803A-4268-9D65-28A9B8B65636/data/Containers/Data/Application/E34DD4A1-0207-4365-A428-614D39785781/Documents/images/798807FA-D41E-4109-B813-D21F22CC7F0D.jpg"
  </code></pre>
  
  <p>to what works on the web app?</p>