Skip to content

Commit a4d7e65

Browse files
committed
Fix missing keys on Android
1 parent 63a49f4 commit a4d7e65

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -128,29 +128,30 @@ const response = await MultipleImagePicker.openPicker(options);
128128
| maximumMessageTitle | string | Notification | iOS | The title of the alert when the user chooses to exceed the specified number of pictures |
129129
| messageTitleButton | string | Notification | iOS | The title of button in the alert when the user chooses to exceed the specified number of pictures |
130130
| tapHereToChange | string | Tap here to change | iOS | The sub-title in navigation bar (under albums's name in iOS) |
131-
| maximumMessage | string | You have selected the maximum number of media allowed | Both | The description of the alert when the user chooses to exceed the specified number of pictures |
132-
| maximumVideoMessage | string | You have selected the maximum number of media allowed | Both | The description of the alert when the user chooses to exceed the specified number of videos |
131+
| maximumMessage | string | You have selected the maximum number of media allowed | Both | The description of the alert when the user chooses to exceed the specified number of pictures |
132+
| maximumVideoMessage | string | You have selected the maximum number of media allowed | Both | The description of the alert when the user chooses to exceed the specified number of videos |
133133

134134
#### selectedAssets (Important)
135135

136136
Get an Array value only. If you want React Native Multiple Image Picker to re-select previously selected images / videos, you need to add “selectedAssets” in [options](#Options). Perhaps I say a little bit confusing. See [Example](https://github.com/baronha/react-native-multiple-image-picker/tree/main/example) for more details.
137137

138138
## Response Object
139139

140-
| Property | Type | Platform | Description |
141-
| --------------- | :----: | :------: | :----------------------------------------------------------------------- |
142-
| path | string | Both | Selected media's path |
143-
| filename | string | Both | Selected media's filename |
144-
| localIdentifier | string | Both | Selected media's local identifier |
145-
| width | number | Both | Selected photo/video width |
146-
| height | number | Both | Selected photo/video height |
147-
| mime | string | Both | Selected photo/video MIME type (image/jpeg, image/png, video/mp4 etc...) |
148-
| type | string | Both | Selected image type (image or video) |
149-
| size | number | Both | Selected photo/video size in bytes |
150-
| duration | number | Both | duration of the video (0 for images) |
151-
152-
| thumbnail | string | Both | Appears only in video format and you must have set isExportThumbnail = true. See [options](#Options) |
153-
| creationDate | string | iOS | UNIX timestamp when image was created |
140+
| Property | Type | Platform | Description |
141+
| ---------------- | :----: | :------: | :--------------------------------------------------------------------------------------------------- |
142+
| path | string | Both | Selected media's path |
143+
| filename | string | Both | Selected media's filename |
144+
| localIdentifier | string | Both | Selected media's local identifier |
145+
| width | number | Both | Selected photo/video width |
146+
| height | number | Both | Selected photo/video height |
147+
| mime | string | Both | Selected photo/video MIME type (image/jpeg, image/png, video/mp4 etc...) |
148+
| type | string | Both | Selected image type (image or video) |
149+
| size | number | Both | Selected photo/video size in bytes |
150+
| duration | number | Both | duration of the video (0 for images) |
151+
| thumbnail | string | Both | Appears only in video format and you must have set isExportThumbnail = true. See [options](#Options) |
152+
| realPath | string | Android | Real path to file |
153+
| parentFolderName | string | Android | Parent folder name of file |
154+
| creationDate | string | iOS | UNIX timestamp when image was created |
154155

155156
## To Do
156157

android/src/main/java/com/reactnativemultipleimagepicker/MultipleImagePickerModule.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ class MultipleImagePickerModule(reactContext: ReactApplicationContext) :
212212
val type: String = if (item.mimeType.startsWith("video/")) "video" else "image"
213213
media.putString("path", item.path)
214214
media.putString("realPath", item.realPath)
215-
media.putString("fileName", item.fileName)
215+
media.putString("filename", item.fileName)
216216
media.putInt("width", item.width)
217217
media.putInt("height", item.height)
218218
media.putString("mime", item.mimeType)
@@ -284,4 +284,3 @@ class MultipleImagePickerModule(reactContext: ReactApplicationContext) :
284284
}
285285

286286
}
287-

src/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ export type Results = {
88
height: number;
99
mime: string;
1010
type: string;
11+
size: number;
12+
bucketId?: number;
13+
realPath?: string;
14+
parentFolderName?: string;
1115
thumbnail?: string;
1216
creationDate?: string;
1317
};

0 commit comments

Comments
 (0)