Skip to content

Commit

Permalink
remove return double file://file:// in iOS #61 #40
Browse files Browse the repository at this point in the history
  • Loading branch information
Bảo Gia committed Jan 16, 2022
1 parent a4cb25b commit 5c275b2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions example/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ export default function App() {
isExportThumbnail: true,
maxVideo: 1,
usedCameraButton: false,
singleSelectedMode: true,
isCrop: true,
isCropCircle: true,
// selectedColor: '#f9813a',
});
console.log('done: ', response);
setImages([response]);
console.log('response: ', response);
setImages(response);
} catch (e) {
console.log(e.code, e.message);
}
Expand All @@ -44,7 +42,7 @@ export default function App() {
uri:
item?.type === 'video'
? item?.thumbnail ?? ''
: 'file://' + item?.crop?.cropPath,
: 'file://' + (item?.crop?.cropPath ?? item.path),
}}
style={style.media}
/>
Expand Down
2 changes: 1 addition & 1 deletion ios/MultipleImagePicker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class MultipleImagePicker: NSObject, TLPhotosPickerViewControllerDelegate,UINavi

func createAttachmentResponse(filePath: String?, withFilename filename: String?, withType type: String?, withAsset asset: PHAsset, withTLAsset TLAsset: TLPHAsset ) -> [AnyHashable :Any]? {
var media = [
"path": "file://" + filePath! as String,
"path": filePath! as String,
"localIdentifier": asset.localIdentifier,
"fileName":TLAsset.originalFileName!,
"width": Int(asset.pixelWidth ) as NSNumber,
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ let defaultOptions = {
allowedLivePhotos: true,
preventAutomaticLimitedAccessAlert: true, // newest iOS 14
emptyMessage: 'No albums',
selectMessage: 'select',
deselectMessage: 'deselect',
selectMessage: 'Select',
deselectMessage: 'Deselect',
selectedColor: '#FB9300',
maximumMessageTitle: 'Notification',
maximumMessage: 'You have selected the maximum number of media allowed',
Expand Down

0 comments on commit 5c275b2

Please sign in to comment.