0

I need help here.

I have an image data URI and I want to convert it to file:/// i.e. from

data:image/jpeg;base64,/9j/4QBKRXhpZgAASUkqABAAAAAAAAAAAAAAAAEAMQECAB8AAAAiAAAAAAAAAEFkb2JlIFBob3Rvc2hvcCAyMS4xIChXaW5kb3dzKQAA/+ENnWh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8APD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bW...

to

file:///data/user/0/host.exp.exponent/cache/ExperienceData/%2540anonymous%252FDataStreet-dc8e0d36-942b-4031-8cde-a7c936aeef58/ImagePicker/786d58b2-fa4a-49bd-b606-6c22e478ea49.jpg

How Can I do this?

Thanks in advance.

Rich
  • 155
  • 1
  • 8
  • 23
  • Why are you converting base64 image to uri? – Leri Gogsadze Dec 07 '20 at 12:30
  • @J.Doe Thanks for your time. I am using `expo-image-picker`. When I select an image in the android app the photo URI is `file:///data/user/0/ho.....` but the same code returns `data:image/jpeg;base64` as the photo.URI when I select the image on the web. I want the same form `file:///data/u` in both cases. Can you helm me out? – Rich Dec 08 '20 at 04:53
  • Do you send somewhere this image? – Leri Gogsadze Dec 08 '20 at 07:57

0 Answers0