react-native: 0.70.6
react-native-file-access: 2.5.2
Platform: both
BugFileSystem.stat returns successfully
LOG FILE STAT : {"path":"/Users/arindamray/Library/Developer/CoreSimulator/Devices/534FEF3F-32FB-46B1-8A0E-0E1B8D5E736D/data/Containers/Data/Application/B37594E7-1C22-4B81-9F48-EAF5DBF768EE/tmp/react-native-image-crop-picker/1662E6FC-FE1C-4A44-9F98-564105871FE3.jpg","filename":"1662E6FC-FE1C-4A44-9F98-564105871FE3.jpg","size":25464,"lastModified":1675427357827.3997,"type":"file"}
But FileSystem.readFile on the same file fails with
[Error: Failed to read '/Users/arindamray/Library/Developer/CoreSimulator/Devices/534FEF3F-32FB-46B1-8A0E-0E1B8D5E736D/data/Containers/Data/Application/B37594E7-1C22-4B81-9F48-EAF5DBF768EE/tmp/react-native-image-crop-picker/1662E6FC-FE1C-4A44-9F98-564105871FE3.jpg'.]
The perms on the file are -rw-r--r-- so reading should be possible.
The error message should be more descriptive on why it is failing.
To reproduce
I came across this behaviour in my mobile app that tries to move a local image to an s3 location.
It needs to read the contents of the file into a byte array before uploading to an s3 presigned URL.
I am not sure this is a bug but I saw no other way of asking about this than filing a bug.
react-native: 0.70.6 react-native-file-access: 2.5.2 Platform: both
Bug
FileSystem.stat
returns successfullyBut
FileSystem.readFile
on the same file fails withThe perms on the file are
-rw-r--r--
so reading should be possible. The error message should be more descriptive on why it is failing.To reproduce I came across this behaviour in my mobile app that tries to move a local image to an s3 location. It needs to read the contents of the file into a byte array before uploading to an s3 presigned URL. I am not sure this is a bug but I saw no other way of asking about this than filing a bug.