phonegap-base64 icon indicating copy to clipboard operation
phonegap-base64 copied to clipboard

ios “Not allowed to load local resource”

Open lolaswift opened this issue 6 years ago • 2 comments

It works perfectly on android but not on ios

lolaswift avatar Apr 24 '18 11:04 lolaswift

same

devnik avatar Oct 01 '18 07:10 devnik

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">

Dhanya-111 avatar Oct 01 '18 10:10 Dhanya-111