itinance / react-native-fs

Native filesystem access for react-native
MIT License
4.89k stars 954 forks source link

can't get mp4 files from external storage(from smartphone) In android #1219

Closed ghshgd closed 4 months ago

ghshgd commented 4 months ago

Description is same with title. Can't get mp4 files from smartphone. When I load files from smartphone with this code

const dirs = await RNFS.readDir(path);

  for (const dir of dirs) {
    if (dir.isDirectory()) {
      const files = await RNFS.readDir(dir.path);
        for (const file of files) {
          const files = await RNFS.readDir(dir.path);
          if (file.isFile()) {
            console.log(`filepath:${flie.path}`);
          }
        }
      }
    }

Only jpg files can be loaded not mp4 file. How can I load mp4 files? Someone let me know this. note that I get permission,