Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[expo-file-system] Add support for ph:// scheme in FileSystem #5195

Merged
merged 3 commits into from
Aug 6, 2019

Conversation

sjchmiela
Copy link
Contributor

@sjchmiela sjchmiela commented Aug 6, 2019

Why

Should fix #4995.

How

Added support for ph:// scheme in FileSystem.

Test Plan

With this change running

CameraRoll.getPhotos({
    first: 10,
    assetType: 'All',
  }).then(({ edges }) => FileSystem.getInfoAsync(edges[0].node.image.uri).then(console.log));

rendered

Object {
  "exists": true,
  "isDirectory": false,
  "modificationTime": 1526314683.382386,
  "uri": null,
}

instead of

[Unhandled promise rejection: Error: File 'ph://4607021A-7369-459C-881D-277E6612A4E7/L0/001' isn't readable.]

@sjchmiela sjchmiela requested a review from bbarthec August 6, 2019 10:16
@sjchmiela sjchmiela force-pushed the @sjchmiela/add_support_for_ph_in_file_system branch from 2e136a7 to 918e5d9 Compare August 6, 2019 13:23
@sjchmiela sjchmiela merged commit ca7ff56 into master Aug 6, 2019
@sjchmiela sjchmiela deleted the @sjchmiela/add_support_for_ph_in_file_system branch August 6, 2019 13:24
sjchmiela added a commit that referenced this pull request Aug 6, 2019
# Why

Should fix #4995.

# How

Added support for `ph://` scheme in FileSystem.

# Test Plan

With this change running
```js
CameraRoll.getPhotos({
    first: 10,
    assetType: 'All',
  }).then(({ edges }) => FileSystem.getInfoAsync(edges[0].node.image.uri).then(console.log));
```
rendered
```
Object {
  "exists": true,
  "isDirectory": false,
  "modificationTime": 1526314683.382386,
  "uri": null,
}
```
instead of
```
[Unhandled promise rejection: Error: File 'ph://4607021A-7369-459C-881D-277E6612A4E7/L0/001' isn't readable.]
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FileSystem.getInfoAsync on IOS throw error "ph://...' isn't readable"
2 participants