But when I try to access the files, for example to display an image downloaded in the local filesystem, my IOS device does not show any image.
The files.toURL() correctly returns : file:///var/mobile/Containers/Data/Application/XXXXXXXX/Library/NoCloud/myIMG.jpg
Looking to the container shows that the files are inside.
Even this command gives an empty image : <img src="file:///var/mobile/Containers/Data/Application/XXXXXXXX/Library/NoCloud/myIMG.jpg"/>
Any help please ? Cannot understand why I can write but no read a downloaded file to the local system.
I wonder if you couldnāt benefit from the wisdom Iāve acquired over the last couple of weeks, where I was trying to download and save mp3 files to play with the html5 <audio> tag. Iāve just posted information about it in another solution on this forum. But, the easiest way to see what Iām doing is to look at my code in https://github.com/VictorNorman/AudioPlayFromData.
See home.page.ts and code.ts for code that copies files, reads them, changes the URLs to be useable, etc.
But now I am stucked with dynamic background-image on angularā¦
I have tried all these options, none of them display the image <ion-card [style.backgroundImage]="'url(' + fixURL(url) + ')'"></ion-card> <ion-card [style.background]="'url(' + fixURL(url) + ')'"></ion-card> <ion-card [style.background-image]="'url(' + fixURL(url) + ')'"></ion-card> <ion-card [ngStyle]="'url(' + fixURL(url) + ')'"></ion-card>
Error message in console fixURL > SafeValue must use [property]=binding: ionic://localhost/_app_file_/var/mobile/Containers/Data/Application/B751E65D-DEAE-4292-BC08-3EAB25E76E1C/Library/NoCloud/135/135.jpg (see http://g.co/ng/security#xss)
Any idea why working with image but not background-image�
Sorry, but I havenāt done anything with background images, especially in ion-cards. Looking at the ion-card docs, it appears you are supposed to set the background with --background, but Iām not sure if that helps you for this problem at all.
Is this error message coming from the return this.sanitizer.bypassSecurityTrustUrl(fixedURL);
call or from somewhere else?