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

RNFS: account for changing DocumentDirectoryPath #1961

Merged
merged 2 commits into from
Jan 24, 2024

Conversation

kaloudis
Copy link
Contributor

This addresses an issue with Contacts images on iOS. With iOS design, the DocumentDirectoryPath changes with each update. This would cause our saved images to break upon update.

Related issue: itinance/react-native-fs#528

This PR ensures that images persist across app updates.

@@ -67,7 +67,7 @@ const transformContactData = async (contact: any) => {
}).promise;

console.log('Download successful!');
transformedContact.photo = 'file://' + filePath;
transformedContact.photo = 'rnfs://' + fileName;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should also do such changes in selectPhoto of AddContact.tsx ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call 2e5bebf

@kaloudis kaloudis merged commit afe61e6 into ZeusLN:master Jan 24, 2024
3 checks passed
@kaloudis kaloudis deleted the rnfs-handle-changing-dir- branch January 24, 2024 17:12
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.

2 participants