react-native-documents / document-picker

Document Picker for React Native
https://react-native-documents.github.io/
MIT License
1.35k stars 437 forks source link

Can't choose type file. #558

Closed vietdung97 closed 2 years ago

vietdung97 commented 2 years ago

Question

Hi all, I can't choose only type file .mp3 or .m4a in both IOS & Android. Here is my code:

      const result = await DocumentPicker.pickSingle({
        type: 'audio/mp3 audio/m4a public.mp3 public.mpeg-4-audio',
        allowMultiSelection: false,
      });

Can someone help me :( Thank you!

vonovak commented 2 years ago

Hello, can you try with type: ['audio/mp3', 'audio/m4a public.mp3', 'public.mpeg-4-audio']?

Thank you 🙂

vietdung97 commented 2 years ago

Hello, can you try with type: ['audio/mp3', 'audio/m4a public.mp3', 'public.mpeg-4-audio']?

Thank you 🙂

Tysm<3. It work perfectly in IOS. I find my issues in https://github.com/rnmods/react-native-document-picker/issues/294