Size limit iframe with base64 data from database

Hi ,
I use the an HTML component to view a pdf file , stored as data:base64 in my database.

Also implemented a "SafePipe", resoureceURL : return this.sanitizer.bypassSecurityTrustResourceUrl(value);

This works with pdf files up to 2 to 3 MB , if larger the HTML component shows a blank canvas .

Any suggestions how to display larger files .


Hi All,

I have come across this as an answer Why.:

Data URI Limits

The data URI spec does not define a size limit but says applications may impose their own.

  • Chrome - 2MB for the current document. Otherwise the limit is the in-memory storage limit for arbitrary blobs: if x64 and NOT ChromeOS or Android, then 2GB; otherwise, total_physical_memory / 5 .
  • Firefox - unlimited
  • IE ≥ 9 & Edge - 4GB
  • Safari & Mobile Safari - ?

So the limitation is by browser .. but how to bypass this ..

We are not aware of any way to bypass browser imposed limitations.