Ecrion Software Inc. Homepage
Forum Home Forum Home > XF Designer > Knowledge Database
  New Posts New Posts RSS Feed: Inserting base64 images from data source
  FAQ FAQ  Forum Search   Register Register  Login Login

Inserting base64 images from data source

 Post Reply Post Reply
Author
Message / View First Unread Post
justinw View Drop Down
Admin Group
Admin Group
Avatar

Joined: 08 Dec 2011
Posts: 199
Post Options Post Options   Quote justinw Quote  Post ReplyReply Direct Link To This Post Topic: Inserting base64 images from data source
    Posted: 09 Mar 2012 at 10:19am
Q:  My data source contains base64 encoded images that I want to display in my template dynamically.  How can use these strings to display the images appropriately?

A:  This can simply be achieved by selecting the Insert Tab and then selecting Image.  You can then select the "Embed" checkbox, and select the "..." expand button to browse to our "dynamic value from input XML".    

Because the generic value of this src attribute is, "data:MIMETYPE,BASE64BLOB", we will need to use the "concatenate" function available in the Edit Expression dialog (unless the data syntax is already a part of your data source string).  To successfully complete this, use the following steps in the Edit Expression dialog.

1.  In the Working Objects window, select functions.
2.  In the Function Types window, select string.
3.  In the String window, double click "concat()" (this will add the function to the expression above).  
4.  Within the parenthesis, you can add your appropriate arguments such as:
concat('data:image/jpeg,',SOME_XPATH) where SOME_XPATH will require you to browse the XML data to select your desired source.




Edited by justinw - 09 Mar 2012 at 1:00pm
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.69
Copyright ©2001-2010 Web Wiz

This page was generated in 0.133 seconds.