From 59fe4a21937111425c0296c1b0022a2fb146a1ee Mon Sep 17 00:00:00 2001 From: Roman Musin Date: Sun, 17 Jan 2021 11:40:24 +0000 Subject: [PATCH] Mobile: When attaching a file to a note set correct title and extension (#4373) --- packages/app-mobile/components/screens/Note.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app-mobile/components/screens/Note.tsx b/packages/app-mobile/components/screens/Note.tsx index 652dc4fc8..5143d17ac 100644 --- a/packages/app-mobile/components/screens/Note.tsx +++ b/packages/app-mobile/components/screens/Note.tsx @@ -635,8 +635,8 @@ class NoteScreenComponent extends BaseScreenComponent { let resource = Resource.new(); resource.id = uuid.create(); resource.mime = mimeType; - resource.title = pickerResponse.fileName ? pickerResponse.fileName : ''; - resource.file_extension = safeFileExtension(fileExtension(pickerResponse.fileName ? pickerResponse.fileName : localFilePath)); + resource.title = pickerResponse.name ? pickerResponse.name : ''; + resource.file_extension = safeFileExtension(fileExtension(pickerResponse.name ? pickerResponse.name : localFilePath)); if (!resource.mime) resource.mime = 'application/octet-stream';