Skip to content

Commit

Permalink
Fix all files on iOS (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
matei-oltean authored Dec 15, 2020
1 parent 4053e61 commit 4dce59c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The type or types of documents to allow selection of. May be an array of types a

- On Android these are MIME types such as `text/plain` or partial MIME types such as `image/*`. See [common MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types).
- On iOS these must be Apple "[Uniform Type Identifiers](https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html)"
- If `type` is omitted it will be treated as `*/*` or `public.content`.
- If `type` is omitted it will be treated as `*/*` or `public.item`.
- Multiple type strings are not supported on Android before KitKat (API level 19), Jellybean will fall back to `*/*` if you provide an array with more than one value.

##### [iOS only] `copyTo`:`"cachesDirectory" | "documentDirectory"`:
Expand Down Expand Up @@ -101,7 +101,7 @@ The base64 encoded content of the picked file if the option `readContent` was se

`DocumentPicker.types.*` provides a few common types for use as `type` values, these types will use the correct format for each platform (MIME types on Android, UTIs on iOS).

- `DocumentPicker.types.allFiles`: All document types, on Android this is `*/*`, on iOS is `public.content` (note that some binary and archive types do not inherit from `public.content`)
- `DocumentPicker.types.allFiles`: All document types, on Android this is `*/*`, on iOS is `public.item`
- `DocumentPicker.types.images`: All image types (`image/*` or `public.image`)
- `DocumentPicker.types.plainText`: Plain text files ie: `.txt` (`text/plain` or `public.plain-text`)
- `DocumentPicker.types.audio`: All audio types (`audio/*` or `public.audio`)
Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ declare module 'react-native-document-picker' {
zip: 'application/zip';
};
utis: {
allFiles: 'public.content';
allFiles: 'public.item';
audio: 'public.audio';
csv: 'public.comma-separated-values-text';
doc: 'com.microsoft.word.doc';
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const Types = {
zip: 'application/zip',
},
utis: {
allFiles: 'public.content',
allFiles: 'public.item',
audio: 'public.audio',
csv: 'public.comma-separated-values-text',
doc: 'com.microsoft.word.doc',
Expand Down

1 comment on commit 4dce59c

@arochedy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you ;) it's fix my issue : #349

Please sign in to comment.