Attachment Name? - InfoPath Dev
in

InfoPath Dev

Attachment Name?

Last post 03-05-2006 10:52 AM by Stephanie Cantwell. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-14-2005 07:14 AM

    Attachment Name?

    If user has attached an attachment (in the Picture or File Attachment (base64)), is it possible for us to extract the attachment filename to be displayed in other field?


    Thanks!
  • 03-05-2006 10:52 AM In reply to

    This requires code to decode the file attachment blob.
    The following link has an article describing the structure of the attachment header:
    http://blogs.msdn.com/infopath/archive/2004/03/18/92221.aspx

    The following is an excerpt describing the header format:

    Upon attaching a file, InfoPath first builds a header structure which includes information about the file being attached. The structure consists of the following:
    BYTE[4]: Signature (based on the signature for PNG):
    (decimal) 199 73 70 65
    (hexadecimal) C7 49 46 41
    (ASCII C notation) \307 I F A

    The first byte is chosen as a non-ASCII value to reduce the probability that a text file may be misrecognized as a file attachment. The rest identifies the file as an InfoPath File Attachment.
    · DWORD: Size of the header
    · DWORD: IP Version
    · DWORD: dwReserved
    · DWORD: File size
    · DWORD: Size of file name buffer
    · File name buffer: variable size
    Stephanie Cantwell / Test Manager
    Qdabra® Software / Streamline data gathering to turn process into knowledge

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.