<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: How can I  extract  attachment from an xml file？</title><link>https://www.infopathdev.com:443/forums/thread/117570.aspx</link><pubDate>Thu, 02 Nov 2017 14:14:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:117570</guid><dc:creator>rajkumar.bathula</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/117570.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=117570</wfw:commentRss><description>Hello,
I am looking for solution to read the user attached file (usually JPEG, PNG ) from the form and compress it (to reduce file size) and then placing these compressed files instead actual files that user attached. Mine is a browser enabled form. Please advice if we can achieve it. 
I have code behind option enabled for my form. So i can use c# code to compress the attachments.</description></item><item><title>How to Extract Attachment from Infopath Forms in javascript?</title><link>https://www.infopathdev.com:443/forums/thread/37173.aspx</link><pubDate>Thu, 15 Jan 2009 20:04:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37173</guid><dc:creator>bejjanki05</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37173.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=37173</wfw:commentRss><description>&lt;p&gt;Please reply ASAP if ypou know.&lt;/p&gt;</description></item><item><title>Re: How can I  extract  attachment from an xml file？</title><link>https://www.infopathdev.com:443/forums/thread/32200.aspx</link><pubDate>Thu, 11 Sep 2008 20:51:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32200</guid><dc:creator>joguras</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32200.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=32200</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi,&lt;/p&gt;&lt;p&gt;&amp;nbsp;is it possible to extract attachment from browser-enabled form to avoid sync form from server to client&amp;#39;s browser? when I use InfoPath 2007 to store attachment into my form the is no network traffic from server to infoPath 2007 after I clicked Attach. When I use the same form with IE after saving attachment to the server I see network traffic back to my client&amp;#39;s browser - InfoPath Forms Services sync loaded form with with one in my browser.&lt;/p&gt;&lt;p&gt;&amp;nbsp;I investige structure of webpage showing my form and found some variable (javascript) which contains all form&amp;#39;s data !&lt;/p&gt;&lt;p&gt;How to avoid sync form after loading attachment to the server?&lt;/p&gt;&lt;p&gt;&amp;nbsp;Regards,&lt;/p&gt;&lt;p&gt;Robert &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How can I  extract  attachment from an xml file？</title><link>https://www.infopathdev.com:443/forums/thread/29887.aspx</link><pubDate>Fri, 27 Jun 2008 17:49:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29887</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29887.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29887</wfw:commentRss><description>&lt;p&gt;Hi:&lt;/p&gt;
&lt;p&gt;That information is in the file header. In the post at &lt;a href="http://chrissyblanco.blogspot.com/2006/07/infopath-2007-file-attachment-control.html"&gt;http://chrissyblanco.blogspot.com/2006/07/infopath-2007-file-attachment-control.html&lt;/a&gt;&amp;nbsp;about halfway down the code, the author pulls the file name from the attachment and converts it from bytes to a string. When I tried using this code (modifying only the location it saves a file to, adding a message box to show me the file name variable, and fixing one issue) the fileName variable included the file extension.&lt;/p&gt;
&lt;p&gt;The modification I made was to change this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;// The actual filename starts at position 24 . . . &lt;br /&gt;&lt;/font&gt;&lt;span style="FONT-FAMILY:courier new;"&gt;&lt;span style="FONT-SIZE:85%;COLOR:#000000;"&gt;for (int i = 0; i &amp;lt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-FAMILY:courier new;"&gt;&lt;span style="FONT-SIZE:85%;COLOR:#000000;"&gt;{ &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-FAMILY:courier new;"&gt;&lt;span style="FONT-SIZE:85%;COLOR:#000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; fnBytes[i] = attachmentNodeBytes[24 + i]; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="FONT-FAMILY:courier new;"&gt;&lt;span style="FONT-SIZE:85%;COLOR:#000000;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;to this:&lt;/p&gt;
&lt;blockquote&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// The actual filename starts at position 24 . . . &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;for&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; i = 0; i &amp;lt; fnLength; ++i)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fnBytes[i] = attachmentNodeBytes[24 + i];&lt;br /&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;since the for condition was not complete (and, of course, &amp;lt;&amp;gt; is not a valid C# operator).&lt;/p&gt;</description></item><item><title>Re: How can I  extract  attachment from an xml file？</title><link>https://www.infopathdev.com:443/forums/thread/29882.aspx</link><pubDate>Fri, 27 Jun 2008 16:34:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29882</guid><dc:creator>apanlee</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29882.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29882</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I&amp;#39; ve already&amp;nbsp; extracted attachment file to local file successfully, But i must know the atachment file type at first.&amp;nbsp; &lt;/p&gt;&lt;p&gt;However, user&amp;nbsp; will upload .doc file or .pdf file or others type , How can i got the file type?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How can I  extract  attachment from an xml file？</title><link>https://www.infopathdev.com:443/forums/thread/29805.aspx</link><pubDate>Thu, 26 Jun 2008 15:15:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29805</guid><dc:creator>apanlee</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29805.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29805</wfw:commentRss><description>Thank you very much. &lt;br /&gt;</description></item><item><title>Re: How can I  extract  attachment from an xml file？</title><link>https://www.infopathdev.com:443/forums/thread/29745.aspx</link><pubDate>Wed, 25 Jun 2008 14:21:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29745</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29745.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29745</wfw:commentRss><description>&lt;p&gt;Hello:&lt;/p&gt;
&lt;p&gt;I was reminded by someone else that these attachments have a header that you can use to get the name of the file. Please see this helpful blog post for more information: &lt;a href="http://chrissyblanco.blogspot.com/2006/07/infopath-2007-file-attachment-control.html"&gt;http://chrissyblanco.blogspot.com/2006/07/infopath-2007-file-attachment-control.html&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: How can I  extract  attachment from an xml file？</title><link>https://www.infopathdev.com:443/forums/thread/29700.aspx</link><pubDate>Tue, 24 Jun 2008 18:31:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29700</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29700.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29700</wfw:commentRss><description>&lt;p&gt;Hello:&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve done this with an open InfoPath form, connected to the Changed event on a picture control using the following code:&lt;/p&gt;
&lt;blockquote&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; time = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;DateTime&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Now.ToString(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;ddMMyyyyhhmmss&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; fileName = selectedField + time;&lt;/font&gt;&lt;font size="2"&gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;byte&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;[] data = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Convert&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.FromBase64String(picBase);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;//write the file&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;FileStream&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; outFile = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;FileStream&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;(path + fileName + &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;.jpg&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;FileMode&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Create, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;FileAccess&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Write);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;br /&gt;outFile.Write(data, 0, data.Length);&lt;br /&gt;outFile.Close();&lt;/p&gt;&lt;/font&gt;&lt;/blockquote&gt;
&lt;p&gt;Where selectedField is a string value from a node in the form, and path is the file path. I&amp;#39;m not sure how this would work with a file -- I&amp;#39;m also not sure how to get the extension of any file&amp;nbsp; that may be attached, but it might get you started.&lt;/p&gt;</description></item><item><title>How can I  extract  attachment from an xml file？</title><link>https://www.infopathdev.com:443/forums/thread/29699.aspx</link><pubDate>Tue, 24 Jun 2008 17:58:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:29699</guid><dc:creator>apanlee</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/29699.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=29699</wfw:commentRss><description>&lt;p&gt;How can I  to extract  attachment (picture or file attachement*base64) from an XML file (infopath) to  a local  file. I prefor to&amp;nbsp; use C#.

Thank you.&lt;/p&gt;</description></item></channel></rss>