Page 1 of 1

xDeviceFileWrite and VLWEB SP2

Posted: Tue Jul 03, 2018 4:17 pm
by soa
I've asked this question before but I can't seem to find the thread. I'm sure there was something in there about SP2 facilities.

I have a Server module which returns a list of images as BLOBs. I want to show them in a HTML Container. My application is running on an ipad within Longrange. I think I should be able to do this by saving the blobs to local storage using xDeviceFileWrite and referring to them using '<img src="file:///' but I don't know if this is possible.

I don't know what the xDeviceFileWrite properties DataEncoding, FileType and FileEncoding should be to save the file.

I think there was a reference to storing it as base64 and using src='data:image/jpeg;base64' so I could convert my BLOB to a big string and use this method (ie don't use xDeviceFileWrite ) but how do I convert a BLOB to string?

Re: xDeviceFileWrite and VLWEB SP2

Posted: Wed Jul 04, 2018 8:47 am
by tsupartono
Have a look at the PRIM_WEB.BlobReader:

https://docs.lansa.com/14/en/lansa016/p ... reader.htm

--