React-native-document-picker: iOS wrong URI

Created on 19 Jun 2018  路  1Comment  路  Source: rnmods/react-native-document-picker

Hi,

I was having problems getting the file from de URI provided by react-native-document-picker, and I solved removing "file:" from de uri:

Before: file:///uri_to_the_file
After: ///uri_to_the_file

I fixed it doing this:
uri.replace('file:', '')

I think it should be fixed in next versions by passing the correct URI to the React Native frontend.

Thanks for your work, despite this issue, it works like a charm ;)

EDIT: I麓m using RN 0.54.2 and the v3 version of this module ;)

Most helpful comment

Could this be related?, still I tried uri.replace but it still cant find the image.

{"size":16669,"name":"blueberry.jpeg","uri":"file:///private/var/mobile/Containers/Data/Application/F33012B6-9DC5-43B6-A5EA-AABEC208CD52/tmp/br.com.app-Inbox/blueberry.jpeg","type":"image/jpeg"}

/var/mobile/Containers/Data/Application/F33012B6-9DC5-43B6-A5EA-AABEC208CD52/Documents/blueberry.jpeg

>All comments

Could this be related?, still I tried uri.replace but it still cant find the image.

{"size":16669,"name":"blueberry.jpeg","uri":"file:///private/var/mobile/Containers/Data/Application/F33012B6-9DC5-43B6-A5EA-AABEC208CD52/tmp/br.com.app-Inbox/blueberry.jpeg","type":"image/jpeg"}

/var/mobile/Containers/Data/Application/F33012B6-9DC5-43B6-A5EA-AABEC208CD52/Documents/blueberry.jpeg

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vsrinivas150283 picture vsrinivas150283  路  3Comments

St1ma picture St1ma  路  5Comments

johuder33 picture johuder33  路  5Comments

stsiushkevich picture stsiushkevich  路  7Comments

obstruction6761 picture obstruction6761  路  6Comments