Expression is too long.

Expression is too long.

Hello, Im trying to display an image using the <img> tag and the base64 stream, but when i insert the string in the expression it give an error that the expression is too long ...
any help regarding that matter??

Hi Murad,

What is the size of the text that you are trying to put in the expression?
I would recommend you to add the image as a resource in the eSpace and then use BinaryToBase64 from the BinaryData extension to make the text.

João Rosado
Dear Joao;
I retrieve the binary stream from a web service, and i did use the BinaryToBase64 then used the HTML <IMG> tag with the output of the action, but still no output, so i copied and paste the Base64, i got the "Expression is too long"
Regards ;
Using it directly from the service+BinaryToBase64 should work fine.

Can you post a eSpace example with just the tag and image? (set it as resource for example purposes to simulate your service).

sure :)
its attached :)

i saved the binary stream in the database, used the image widget , set it to database and chose the feild that contains the stream, then published when i click on the screen action to get the image, the page loads and the enviroment freezes then i get the attached screen and the debugger goes to the start of the screen action, anything regarding that matter?

After a while this is the output that i get ...
Hi Murad,

Sorry for the delayed response.

First problem: Looking at the eSpace you posted I think the "the enviroment freezes" that you are experiencing is because of the Image with the external url pointing to the same current page, causing it to loop (as you can see by the debugger behavior) and being slow.

Second problem:
Your expression is not correctly escaped you endup with hardcoded string, instead of an expression with the base64 expanded. Look the difference:

Changing this (and adding a image resource in the eSpace to test) it worked fine.
Look here in my personal:

João Rosado

Dear Joao,

THanks for your reply, ive noticed that, ive modified it and then retried it, it works correctly on any other image but the binary that i retrieve from the webservice gets in a loop as well and no image is showing, afterthat i get the attached screen.
thanks alot for your cooporation :)