Skip to content

TagSpaces is an offline, open source, document manager with tagging support

TS73 import images from library

Borislav Sapundzhieve5e6cb6a4696
diff --git a/data/ext/viewerImage/viewer.js b/data/ext/viewerImage/viewer.js
index f26aad754..b67b440c7 100644
--- a/data/ext/viewerImage/viewer.js
+++ b/data/ext/viewerImage/viewer.js
@@ -25,11 +25,14 @@ $(document).ready(function() {
}); */
var imageRotationClass = "";
- var isCordova = document.URL.indexOf('file:///android_asset') === 0;
+ var isCordova = parent.isCordova;
var isWeb = document.URL.indexOf('http') === 0;
if (isCordova || isWeb) {
+ if (parent.cordova && parent.cordova.platformId.match(/ios/i)) {
+ filePath = "cdvfile://localhost/persistent" + encodeURIComponent(filePath);
+ }
} else {
filePath = "file://" + filePath;
}