From 3aa03940624c96b50fb734f6aab9bc11c0b174c6 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sun, 21 Jul 2019 14:39:52 +0100 Subject: [PATCH] Mobile: Fixes #1684: Trying to fix problem when attaching file that contains spaces in name --- ReactNativeClient/lib/components/screens/note.js | 6 +++++- ReactNativeClient/lib/components/screens/notes.js | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ReactNativeClient/lib/components/screens/note.js b/ReactNativeClient/lib/components/screens/note.js index 1aadd1c8c6..7d4b7f6408 100644 --- a/ReactNativeClient/lib/components/screens/note.js +++ b/ReactNativeClient/lib/components/screens/note.js @@ -440,7 +440,11 @@ class NoteScreenComponent extends BaseScreenComponent { return; } - const localFilePath = pickerResponse.uri; + const localFilePath = Platform.select({ + android: pickerResponse.uri, + ios: decodeURI(pickerResponse.uri), + }); + let mimeType = pickerResponse.type; if (!mimeType) { diff --git a/ReactNativeClient/lib/components/screens/notes.js b/ReactNativeClient/lib/components/screens/notes.js index a02ddb889c..e534b47f93 100644 --- a/ReactNativeClient/lib/components/screens/notes.js +++ b/ReactNativeClient/lib/components/screens/notes.js @@ -144,8 +144,6 @@ class NotesScreenComponent extends BaseScreenComponent { notes: notes, notesSource: source, }); - - console.info('Done', Date.now() - startTime); } deleteFolder_onPress(folderId) {