A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix checking if file type is image
ammarahm-ed5a05a4c10006
diff --git a/apps/mobile/src/views/Editor/tiny/toolbar/picker.js b/apps/mobile/src/views/Editor/tiny/toolbar/picker.jsindex 1f428b7d8..62c4a6c58 100644--- a/apps/mobile/src/views/Editor/tiny/toolbar/picker.js+++ b/apps/mobile/src/views/Editor/tiny/toolbar/picker.js@@ -71,7 +71,7 @@ const file = async () => {}file = file[0];- if (file.type === 'image/') {+ if (file.type.startsWith('image')) {ToastEvent.show({title: 'Type not supported',message: 'Please add images from gallery or camera picker.',@@ -99,13 +99,14 @@ const file = async () => {}let uri = Platform.OS === 'ios' ? file.fileCopyUri : file.uri;- uri = santizeUri(uri);+ console.log('file uri: ',uri);+ uri = Platform.OS === "ios" ? santizeUri(uri) : uri;showEncryptionSheet(file);let hash = await Sodium.hashFile({uri: uri,type: 'url'});- console.log(uri);+ console.log('decoded uri: ',uri);let result = await attachFile(uri, hash, file.type, file.name, 'file');console.log('attach file: ', result);