From 578f93fb9000d0b8535ddd3a42eec6d18ed5f7e9 Mon Sep 17 00:00:00 2001 From: roman-r-m Date: Sat, 9 May 2020 11:26:03 +0100 Subject: [PATCH] Mobile: Improve performance of attaching images, especially large ones (#2945) * Disable sending serialized data over the react-native bridge when attaching image or file * Remove noData opt from DocumentPicker as it's only relevant for ImagePicker --- ReactNativeClient/lib/components/screens/note.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactNativeClient/lib/components/screens/note.js b/ReactNativeClient/lib/components/screens/note.js index 4607889fb..530fa1f6f 100644 --- a/ReactNativeClient/lib/components/screens/note.js +++ b/ReactNativeClient/lib/components/screens/note.js @@ -565,7 +565,7 @@ class NoteScreenComponent extends BaseScreenComponent { } async attachPhoto_onPress() { - const response = await this.showImagePicker({ mediaType: 'photo' }); + const response = await this.showImagePicker({ mediaType: 'photo', noData: true }); await this.attachFile(response, 'image'); }