Mobile: When attaching a file to a note set correct title and extension (#4373)

pull/4387/head
Roman Musin 2021-01-17 11:40:24 +00:00 committed by GitHub
parent df6d146c84
commit 59fe4a2193
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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';