Programmatically Extract InfoPath Attachment

P

Pompey M24

Hi Group,

I know it's possible to programmatically add attachments to an
InfoPath form, but I can't figure out how to do the reverse and
extract an attachment. Ideally I would like to stream the attachment
straight out of the Xml to a new browser window. Anyone know if this
is possible? And if so, how it can be done?

I've looked at the following article:
http://tips.serriform.com/CSharpCreateInfoPathAttachment.htm

Many thanks.
 
M

Matthew Blain \(Serriform\)

You need to reverse the process described in that article: instead of
serializing the struct and copying the result into a node, you need to get
the text of the node, convert it into binary from base64, deserialize the
struct, read the filename and other info, then rest of the bytes in the
binary data will be the image or other data.

This is described in more detail in the upcoming book mentioned in my sig,
along with sample code.

--Matthew Blain
http://tips.serriform.com/
http://www.microsoft.com/mspress/books/7128.asp
 
S

Shem

Hi, Is it possible you can show me how you converted the Base64 to etract
filename and data...

Regards,

Allan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top