Reputation: 403
I've seen things that skirt around this question, but nothing that answers it directly.
I have a RichTextItem in a document that contains an attached image. If I look at the document properties for the field, it says:
Data Type: MIME Part
Data Length: 7615 bytes
...
"Content-Transfer-Encoding: binary
Content-Type: image/jpeg
then a bit of binary data. How can I extract that data in server-side javascript so that I can use it in the value of an image control? In other words, I want the data corresponding to that image to appear in the following so that it renders in the web browser:
<xp:image><xp:this.value><![CDATA[#{javascript:"data:image/jpeg;base64,<DATA HERE>
Can this be done? I've tried all sorts of things but to no avail.
Thanks, Reid
Upvotes: 0
Views: 175
Reputation: 20384
There a several approaches you can play with.
....nsf/0/unid/RTItemName?OpenField
in a dojo panel as its source. (see here. It would open the whole RichText.OpenElement
instead - can directly address an attachmentHope that helps
Upvotes: 2