Skip to content

Commit 5c275b2

Browse files
committed
remove return double file://file:// in iOS #61 #40
1 parent a4cb25b commit 5c275b2

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

example/src/App.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ export default function App() {
1414
isExportThumbnail: true,
1515
maxVideo: 1,
1616
usedCameraButton: false,
17-
singleSelectedMode: true,
1817
isCrop: true,
1918
isCropCircle: true,
20-
// selectedColor: '#f9813a',
2119
});
22-
console.log('done: ', response);
23-
setImages([response]);
20+
console.log('response: ', response);
21+
setImages(response);
2422
} catch (e) {
2523
console.log(e.code, e.message);
2624
}
@@ -44,7 +42,7 @@ export default function App() {
4442
uri:
4543
item?.type === 'video'
4644
? item?.thumbnail ?? ''
47-
: 'file://' + item?.crop?.cropPath,
45+
: 'file://' + (item?.crop?.cropPath ?? item.path),
4846
}}
4947
style={style.media}
5048
/>

ios/MultipleImagePicker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ class MultipleImagePicker: NSObject, TLPhotosPickerViewControllerDelegate,UINavi
144144

145145
func createAttachmentResponse(filePath: String?, withFilename filename: String?, withType type: String?, withAsset asset: PHAsset, withTLAsset TLAsset: TLPHAsset ) -> [AnyHashable :Any]? {
146146
var media = [
147-
"path": "file://" + filePath! as String,
147+
"path": filePath! as String,
148148
"localIdentifier": asset.localIdentifier,
149149
"fileName":TLAsset.originalFileName!,
150150
"width": Int(asset.pixelWidth ) as NSNumber,

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ let defaultOptions = {
1818
allowedLivePhotos: true,
1919
preventAutomaticLimitedAccessAlert: true, // newest iOS 14
2020
emptyMessage: 'No albums',
21-
selectMessage: 'select',
22-
deselectMessage: 'deselect',
21+
selectMessage: 'Select',
22+
deselectMessage: 'Deselect',
2323
selectedColor: '#FB9300',
2424
maximumMessageTitle: 'Notification',
2525
maximumMessage: 'You have selected the maximum number of media allowed',

0 commit comments

Comments
 (0)