react-native-multiple-image-picker icon indicating copy to clipboard operation
react-native-multiple-image-picker copied to clipboard

fix: check if file path already has file prefix in it

Open swizes opened this issue 10 months ago • 2 comments

Fix duplicate "file://" prefix in image picker result path

The URL's absoluteString from both iOS Simulator and physical devices already contains the "file://" prefix. Previously, we were unconditionally adding another prefix, resulting in malformed paths like "file://file://...".

Added a check to only prepend "file://" if it's not already present in the path. While this scenario hasn't been observed in testing, this change makes the code more robust by handling edge cases where the prefix might be missing.

swizes avatar Feb 07 '25 10:02 swizes

@baronha could you please take a look at this one

swizes avatar Mar 17 '25 07:03 swizes

This PR should be merged

ThienMD avatar Jul 23 '25 14:07 ThienMD