diff --git a/index.d.ts b/index.d.ts index 38946d4d..4aba233b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -15,12 +15,15 @@ declare module 'react-native-document-picker' { audio: 'audio/*'; csv: 'text/csv'; doc: 'application/msword'; - excel: 'application/vnd.ms-excel'; + docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; images: 'image/*'; pdf: 'application/pdf'; plainText: 'text/plain'; - powerpoint: 'application/vnd.ms-powerpoint'; + ppt: 'application/vnd.ms-powerpoint'; + pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation'; video: 'video/*'; + xls: 'application/vnd.ms-excel'; + xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'; zip: 'application/zip'; }; utis: { @@ -28,25 +31,31 @@ declare module 'react-native-document-picker' { audio: 'public.audio'; csv: 'public.comma-separated-values-text'; doc: 'com.microsoft.word.doc'; - excel: 'com.microsoft.excel.xls'; + docx: 'org.openxmlformats.wordprocessingml.document'; images: 'public.image'; pdf: 'com.adobe.pdf'; plainText: 'public.plain-text'; - powerpoint: 'com.microsoft.powerpoint.ppt'; + ppt: 'com.microsoft.powerpoint.ppt'; + pptx: 'org.openxmlformats.presentationml.presentation'; video: 'public.movie'; + xls: 'com.microsoft.excel.xls'; + xlsx: 'org.openxmlformats.spreadsheetml.sheet'; zip: 'public.zip-archive'; }; extensions: { allFiles: '*'; audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma'; csv: '.csv'; - doc: '.doc .docx'; - excel: '.xls .xlsx'; + doc: '.doc'; + docx: '.docx'; images: '.jpeg .jpg .png'; pdf: '.pdf'; plainText: '.txt'; - powerpoint: '.ppt .pptx'; + ppt: '.ppt'; + pptx: '.pptx'; video: '.mp4'; + xls: '.xls'; + xlsx: '.xlsx'; zip: '.zip .gz'; }; }; diff --git a/index.js b/index.js index c6552136..a1ba2cca 100644 --- a/index.js +++ b/index.js @@ -75,12 +75,15 @@ const Types = { audio: 'audio/*', csv: 'text/csv', doc: 'application/msword', - excel: 'application/vnd.ms-excel', + docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', images: 'image/*', pdf: 'application/pdf', plainText: 'text/plain', - powerpoint: 'application/vnd.ms-powerpoint', + ppt: 'application/vnd.ms-powerpoint', + pptx: 'application/vnd.openxmlformats-officedocument.presentationml.presentation', video: 'video/*', + xls: 'application/vnd.ms-excel', + xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', zip: 'application/zip', }, utis: { @@ -88,12 +91,15 @@ const Types = { audio: 'public.audio', csv: 'public.comma-separated-values-text', doc: 'com.microsoft.word.doc', - excel: 'com.microsoft.excel.xls', + docx: 'org.openxmlformats.wordprocessingml.document', images: 'public.image', pdf: 'com.adobe.pdf', plainText: 'public.plain-text', - powerpoint: 'com.microsoft.powerpoint.ppt', + ppt: 'com.microsoft.powerpoint.ppt', + pptx: 'org.openxmlformats.presentationml.presentation', video: 'public.movie', + xls: 'com.microsoft.excel.xls', + xlsx: 'org.openxmlformats.spreadsheetml.sheet', zip: 'public.zip-archive', }, extensions: { @@ -101,13 +107,16 @@ const Types = { audio: '.3g2 .3gp .aac .adt .adts .aif .aifc .aiff .asf .au .m3u .m4a .m4b .mid .midi .mp2 .mp3 .mp4 .rmi .snd .wav .wax .wma', csv: '.csv', - doc: '.doc .docx', - excel: '.xls .xlsx', + doc: '.doc', + docx: '.docx', images: '.jpeg .jpg .png', pdf: '.pdf', plainText: '.txt', - powerpoint: '.ppt .pptx', + ppt: '.ppt', + pptx: '.pptx', video: '.mp4', + xls: '.xls', + xlsx: '.xlsx', zip: '.zip .gz', }, };