From 9ec759bd4416637c8b2fe7a6a0025493d5bbec6b Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Wed, 22 Jan 2020 21:41:44 +0200 Subject: [PATCH] Import: mime type detection is unreliable, allow filetype matching too. --- src/Journals/ImportDialog.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Journals/ImportDialog.tsx b/src/Journals/ImportDialog.tsx index 3b90730..99f59f3 100644 --- a/src/Journals/ImportDialog.tsx +++ b/src/Journals/ImportDialog.tsx @@ -53,13 +53,13 @@ class ImportDialog extends React.Component { let dropFunction; if (collectionInfo.type === 'ADDRESS_BOOK') { - acceptTypes = ['text/vcard']; + acceptTypes = ['text/vcard', 'text/directory', 'text/x-vcard', '.vcf']; dropFunction = this.onFileDropContact; } else if (collectionInfo.type === 'CALENDAR') { - acceptTypes = ['text/calendar']; + acceptTypes = ['text/calendar', '.ics', '.ical']; dropFunction = this.onFileDropEvent; } else if (collectionInfo.type === 'TASKS') { - acceptTypes = ['text/calendar']; + acceptTypes = ['text/calendar', '.ics', '.ical']; dropFunction = this.onFileDropTask; }