Page 1 of 1

BLOB and IE 11

Posted: Sat Aug 10, 2019 8:26 am
by LANSAGuru

If you have a blob and display it like this...

Define_Com Class(#PRIM_WEB.Page) Name(#Page1) Description('Web Page') Displayposition(2) Height(499) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(36) Width(646)
Mthroutine Name(ShowAsset)
Define_Map For(*INPUT) Class(#FP_ESBLOB)
#page1.Source := *null
#COM_OWNER.Placement := FullScreen
#Page1.Source := #FP_ESBLOB /* not working in IE or Edge */

It works beautifully. Originally this did not work for IE or Edge, but Edge seems to have been fixed.

* Set the source for the web page to the BLOB
* Format is something like this...psuedo url
* blob:http://development:2354/a52a550d-775d-4 ... 95282d0563

IE 11, which is supported still does not work.Researching this I find we are using createObjectURL function.

I found a bunch of complaints about this not is just one... ... rl-in-ie11

SUGGESTSION: can we get a polyfill for this? I could write a widget I suppose but I have a couple of problems. I don't think I can pass anything that large to a widget...correct me if I am wrong. I thought we were limited to maybe something like 64K string at the moment.

So what are the odds of getting a fix and/or polyfill for IE 11.
And, #2, can I pass something like a BLOB to a widget case I need to create a workaround in the short run.


Re: BLOB and IE 11

Posted: Tue Sep 03, 2019 12:52 pm
by BrendanB

you can use ... reader.htm to read the blob.

so call a method something like below should do the trick.

Code: Select all

Mthroutine Name(ReadBlob)
Define_Map For(*INPUT) Class(#STD_BLOB) Name(#iBlob)

Define_Com Class(#PRIM_WEB.BlobReader) Name(#BlobReader)

#BlobReader.Read( #iBlob )

Evtroutine Handling(#BlobReader.Completed) Data(#Data)

#Page1.Source := 'data:' + #iBlob.MimeType + ';base64,' + #Data