1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

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

This commit is contained in:
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

View File

@ -635,8 +635,8 @@ class NoteScreenComponent extends BaseScreenComponent {
let resource = Resource.new(); let resource = Resource.new();
resource.id = uuid.create(); resource.id = uuid.create();
resource.mime = mimeType; resource.mime = mimeType;
resource.title = pickerResponse.fileName ? pickerResponse.fileName : ''; resource.title = pickerResponse.name ? pickerResponse.name : '';
resource.file_extension = safeFileExtension(fileExtension(pickerResponse.fileName ? pickerResponse.fileName : localFilePath)); resource.file_extension = safeFileExtension(fileExtension(pickerResponse.name ? pickerResponse.name : localFilePath));
if (!resource.mime) resource.mime = 'application/octet-stream'; if (!resource.mime) resource.mime = 'application/octet-stream';