From dbb269fef645b4e6024e60bf06a6b156b295ce62 Mon Sep 17 00:00:00 2001 From: "Helmut K. C. Tessarek" Date: Thu, 11 Oct 2018 12:18:33 -0400 Subject: [PATCH] add support for webp images (#858) fixes #848 --- ReactNativeClient/lib/models/Resource.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReactNativeClient/lib/models/Resource.js b/ReactNativeClient/lib/models/Resource.js index 54c28c9c0..a510ad224 100644 --- a/ReactNativeClient/lib/models/Resource.js +++ b/ReactNativeClient/lib/models/Resource.js @@ -26,7 +26,7 @@ class Resource extends BaseItem { } static isSupportedImageMimeType(type) { - const imageMimeTypes = ["image/jpg", "image/jpeg", "image/png", "image/gif", "image/svg+xml"]; + const imageMimeTypes = ["image/jpg", "image/jpeg", "image/png", "image/gif", "image/svg+xml", "image/webp"]; return imageMimeTypes.indexOf(type.toLowerCase()) >= 0; } @@ -94,7 +94,7 @@ class Resource extends BaseItem { const plainTextPath = this.fullPath(decryptedItem); const encryptedPath = this.fullPath(decryptedItem, true); const noExtPath = pathUtils.dirname(encryptedPath) + '/' + pathUtils.filename(encryptedPath); - + // When the resource blob is downloaded by the synchroniser, it's initially a file with no // extension (since it's encrypted, so we don't know its extension). So here rename it // to a file with a ".crypted" extension so that it's better identified, and then decrypt it.