Publish Infopath form which has image object(Base64Binary)<p>Hello Folks,</p> <p> </p> <p>    Whenever i'd like to publish the template(which has Image Attachment(base64binary as datatype)), it showing following exception.</p> <p><em><strong>The selected field cannot be promoted because its datatype is not supported: base64binary</strong></em></p> <p><strong><em></em></strong> </p> <p>I'd appreciate if you folks can help me to resolve this problem - My requirement is, i need to publish attachment column into Forms Library as URL column.</p> <p> </p> <p>Please do the needful.</p> <p> </p> <p>Thanks</p>© 2009 Microsoft Corporation. All rights reserved.Mon, 28 Sep 2009 10:59:33 Zf2b78cee-4a47-4d05-b3af-60b376718717http://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/f2b78cee-4a47-4d05-b3af-60b376718717#f2b78cee-4a47-4d05-b3af-60b376718717http://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/f2b78cee-4a47-4d05-b3af-60b376718717#f2b78cee-4a47-4d05-b3af-60b376718717JohnySmithhttp://social.msdn.microsoft.com/Profile/en-US/?user=JohnySmithPublish Infopath form which has image object(Base64Binary)<p>Hello Folks,</p> <p> </p> <p>    Whenever i'd like to publish the template(which has Image Attachment(base64binary as datatype)), it showing following exception.</p> <p><em><strong>The selected field cannot be promoted because its datatype is not supported: base64binary</strong></em></p> <p><strong><em></em></strong> </p> <p>I'd appreciate if you folks can help me to resolve this problem - My requirement is, i need to publish attachment column into Forms Library as URL column.</p> <p> </p> <p>Please do the needful.</p> <p> </p> <p>Thanks</p>Thu, 07 Jun 2007 18:26:35 Z2007-06-07T18:26:35Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/f2b78cee-4a47-4d05-b3af-60b376718717#e4d6be05-a950-499c-9bf6-d669af780bb7http://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/f2b78cee-4a47-4d05-b3af-60b376718717#e4d6be05-a950-499c-9bf6-d669af780bb7David Deanhttp://social.msdn.microsoft.com/Profile/en-US/?user=David%20DeanPublish Infopath form which has image object(Base64Binary)<p>Sorry - this can't be done directly. InfoPath cannot promote a field to a URL column and attachments are embedded within the InfoPath XML document.</p> <p> </p> <p>You would have to submit the InfoPath form to a custom web service that extracts the attachment from the form XML, saves the attachment to a document library, saves the form to a document library, then sets the URL column value for the new SPListItem to the URL of the attachment.</p> <p> </p>Fri, 08 Jun 2007 11:18:01 Z2007-06-08T11:18:01Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/f2b78cee-4a47-4d05-b3af-60b376718717#d0ea0998-1ba8-4c05-a682-ca4d02d4b994http://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/f2b78cee-4a47-4d05-b3af-60b376718717#d0ea0998-1ba8-4c05-a682-ca4d02d4b994AliceaMChttp://social.msdn.microsoft.com/Profile/en-US/?user=AliceaMCPublish Infopath form which has image object(Base64Binary)<p>David,</p> <p>I'm having this problem as well.  Are there any default web services available to do this or do you know of a site that has samples of this type of web service that can be modified to fit what a person needs?  I keep seeing references to creating a web service, but can't find a walk thru to building one.</p> <p> </p> <p>Thanks in advance for any help you can provide.</p>Tue, 12 Jun 2007 13:44:36 Z2007-06-12T13:44:36Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/f2b78cee-4a47-4d05-b3af-60b376718717#f46b3262-25b2-4508-819f-10c49f266e9ahttp://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/f2b78cee-4a47-4d05-b3af-60b376718717#f46b3262-25b2-4508-819f-10c49f266e9aGeorge Olsonhttp://social.msdn.microsoft.com/Profile/en-US/?user=George%20OlsonPublish Infopath form which has image object(Base64Binary)<p>If you set the form to be browser enabled you should not have the option of adding a image attachment.  However, you can have a regular attachment, which is base 64, plus it is has some InfoPath headers.  A web service can accept this.  Here is a class that you can use for it based on some other info, there is another code option that you can find here: <a title="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1507940&amp;SiteID=1" href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1507940&amp;SiteID=1">http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1507940&amp;SiteID=1</a> .  The web service can actually accept the base 64 field as a byte array.  An easy way to create the object that the WS receives is to save the files as source files and then run the xsd gen tool to create your class.  I don't know if this is what you are looking for, but I hope it helps:</p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;color:blue;font-family:'Courier New'"> <div class=codeseg> <div class=codecontent> <div class=codesniptitle><span style="width:100%">Code Snippet</span></div> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;color:blue;font-family:'Courier New'">using</span><span style="font-size:10pt;font-family:'Courier New'"> System;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;color:blue;font-family:'Courier New'">using</span><span style="font-size:10pt;font-family:'Courier New'"> System.Collections.Generic;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;color:blue;font-family:'Courier New'">using</span><span style="font-size:10pt;font-family:'Courier New'"> System.Text;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;color:blue;font-family:'Courier New'">using</span><span style="font-size:10pt;font-family:'Courier New'"> System.IO;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;color:blue;font-family:'Courier New'">namespace</span><span style="font-size:10pt;font-family:'Courier New'"> CTED.InfoPath</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">{</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">    <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;summary&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">    <span style="color:gray">///</span><span style="color:green"> Class used to decode an InfoPath attachment.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">    <span style="color:gray">///</span><span style="color:green"> Pulls the file name and the decoded file from either a base 64 byte array or string.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">    <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;/summary&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">    <span style="color:blue">public</span> <span style="color:blue">class</span> <span style="color:#2b91af">InfoPathAttachmentDecoder</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">    {</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:green">//  Private string to hold the attachment name.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:blue">string</span> _fileName;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:green">//  Private byte array to hold the decoded attachment.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:blue">byte</span>[] _decodedFile;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;summary&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> The name of the file within the InfoPath attachment.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;/summary&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:blue">public</span> <span style="color:blue">string</span> Filename</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        {</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:blue">get</span> { <span style="color:blue">return</span> _fileName; }</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        }</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;summary&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> The decoded file within the InfoPath attachment.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;/summary&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:blue">public</span> <span style="color:blue">byte</span>[] DecodedFile</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        {</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:blue">get</span> { <span style="color:blue">return</span> _decodedFile; }</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        }</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;summary&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> Constructor for the InfoPathAttachmentDecoder Class</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;/summary&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;param name=&quot;base64EncodedString&quot;&gt;</span><span style="color:green">The attachment represented by a string</span><span style="color:gray">&lt;/param&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:blue">public</span> InfoPathAttachmentDecoder(<span style="color:blue">string</span> base64EncodedString)</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        {</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:green">//  Use unicode encoding.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:#2b91af">Encoding</span> _encoding = <span style="color:#2b91af">Encoding</span>.Unicode;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:green">//  The byte array containing the data.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:blue">byte</span>[] _data = <span style="color:#2b91af">Convert</span>.FromBase64String(base64EncodedString);</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:green">//  Use a memory stream to access the data.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:blue">using</span> (<span style="color:#2b91af">MemoryStream</span> _memoryStream = <span style="color:blue">new</span> <span style="color:#2b91af">MemoryStream</span>(_data))</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            {</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">                <span style="color:green">//  Create a binary reader from the stream.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">                <span style="color:#2b91af">BinaryReader</span> _theReader = <span style="color:blue">new</span> <span style="color:#2b91af">BinaryReader</span>(_memoryStream);</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">                <span style="color:green">//  Create a byte array to hold the header data.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">                <span style="color:blue">byte</span>[] _headerData = _theReader.ReadBytes(16);</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">                <span style="color:green">//  Find the file size before finding the file name.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">                <span style="color:blue">int</span> _fileSize = (<span style="color:blue">int</span>)_theReader.ReadUInt32();</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">                <span style="color:green">//  Get the file name.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">                <span style="color:blue">int</span> _attachmentNameLength = (<span style="color:blue">int</span>)_theReader.ReadUInt32() * 2;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">                <span style="color:blue">byte</span>[] _fileNameBytes = _theReader.ReadBytes(_attachmentNameLength);</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">                _fileName = _encoding.GetString(_fileNameBytes, 0, _attachmentNameLength - 2);</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">                <span style="color:green">//  Get the decoded attachment.            </span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">                _decodedFile = _theReader.ReadBytes(_fileSize);</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            }</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        }</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;summary&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> Constructor for the InfoPathAttachmentDecoder Class</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;/summary&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;param name=&quot;base64EncodedBytes&quot;&gt;</span><span style="color:green">The attachment represented by a byte array</span><span style="color:gray">&lt;/param&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:blue">public</span> InfoPathAttachmentDecoder(<span style="color:blue">byte</span>[] base64EncodedBytes) : <span style="color:blue">this</span>(<span style="color:#2b91af">Convert</span>.ToBase64String(base64EncodedBytes)) { }</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;summary&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> Static method that gets the file from the attachment.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;/summary&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;param name=&quot;base64EncodedString&quot;&gt;</span><span style="color:green">The attachment represented by a string</span><span style="color:gray">&lt;/param&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;returns&gt;</span><span style="color:green">Returns a byte array of the file in the attachment.</span><span style="color:gray">&lt;/returns&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:blue">public</span> <span style="color:blue">static</span> <span style="color:blue">byte</span>[] DecodeInfoPathAttachment(<span style="color:blue">string</span> base64EncodedString)</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        {</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:green">//  Create an instance of the InfoPathAttachmentDecoder</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:#2b91af">InfoPathAttachmentDecoder</span> _infoPathAttachmentDecoder = <span style="color:blue">new</span> <span style="color:#2b91af">InfoPathAttachmentDecoder</span>(base64EncodedString);</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:green">//  Return the decoded file.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:blue">return</span> _infoPathAttachmentDecoder.DecodedFile;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        }</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'"> </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;summary&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> Static method that gets the file from the attachment.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;/summary&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;param name=&quot;base64EncodedBytes&quot;&gt;</span><span style="color:green">The attachment represented by a byte array</span><span style="color:gray">&lt;/param&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:gray">///</span><span style="color:green"> </span><span style="color:gray">&lt;returns&gt;</span><span style="color:green">Returns a byte array of the file in the attachment.</span><span style="color:gray">&lt;/returns&gt;</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        <span style="color:blue">public</span> <span style="color:blue">static</span> <span style="color:blue">byte</span>[] DecodeInfoPathAttachment(<span style="color:blue">byte</span>[] base64EncodedBytes)</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        {</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:green">//  Create an instance of the InfoPathAttachmentDecoder</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:#2b91af">InfoPathAttachmentDecoder</span> _infoPathAttachmentDecoder = <span style="color:blue">new</span> <span style="color:#2b91af">InfoPathAttachmentDecoder</span>(base64EncodedBytes);</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            </span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:green">//  Return the decoded file.</span></span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">            <span style="color:blue">return</span> _infoPathAttachmentDecoder.DecodedFile;</span></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'">        }</span></p></div></div> <p> </p></span> <p></p> <p class=MsoNormal style="margin:0in 0in 0pt"><span style="font-size:10pt;font-family:'Courier New'"></span></p>Wed, 13 Jun 2007 02:46:11 Z2007-06-13T02:46:11Zhttp://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/f2b78cee-4a47-4d05-b3af-60b376718717#25e3cdc1-7e54-4c10-943d-a3b5308c07achttp://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/f2b78cee-4a47-4d05-b3af-60b376718717#25e3cdc1-7e54-4c10-943d-a3b5308c07acgiangy11http://social.msdn.microsoft.com/Profile/en-US/?user=giangy11Publish Infopath form which has image object(Base64Binary)is there any news?Mon, 28 Sep 2009 10:59:32 Z2009-09-28T10:59:32Z