phonegap-base64
phonegap-base64 copied to clipboard
ios “Not allowed to load local resource”
It works perfectly on android but not on ios
same
I was getting the same error in iOS. Its a bug in the plugin i guess. If you are using this plugin only to display the image, you may better use normalizeURL. Also use DomSanitizer to prevent "unsafe" issue with the url.
import { normalizeURL } from 'ionic-angular'; import {DomSanitizer} from '@angular/platform-browser';
constructor( private domSanitizer: DomSanitizer){..}
let path = file://...; //your file path here path = normalizeURL(path); this.ImagePath = this.domSanitizer.bypassSecurityTrustUrl(path);
<img [src]= "ImagePath">