Skip to content

Commit

Permalink
Specified OpenXML formats
Browse files Browse the repository at this point in the history
  • Loading branch information
luizppa committed Oct 8, 2020
1 parent 352a547 commit 717fae0
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 14 deletions.
23 changes: 16 additions & 7 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,47 @@ 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: {
allFiles: 'public.content';
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';
};
};
Expand Down
23 changes: 16 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,39 +75,48 @@ 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: {
allFiles: 'public.content',
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',
},
};
Expand Down

0 comments on commit 717fae0

Please sign in to comment.