attachment

5reg

attachment

An arbitrary file attachment

Content Model
    attachment ::= (#PCDATA,
                    &xml-tag;*,
                    &packetsyn1;
                    &packetsyn2;
                    &packetsyn3;
                    &packetsyn4;
                    &packetsyn5;*)
Attributes
Name | Type
`encoding` | `CDATA` (required)
`filename` | `CDATA` (required)
&packetattrlist2col;

&eltaddedver;7.0

## Description

This represents an attachment packet, one of the many types of packet that together form the packet tree that a user sees when they open a ®ina; data file.

An attachment packet stores a single file attachment. The contents of the attachment are encoded in a printable format, using the encoding specified by the `encoding` attribute (see below). The encoded data is contained in the character data that appears before the first child &xml; element.

Whitespace and line breaks within the encoded data are not relevant, and can be ignored.

In ®ina; 6.0.1 and earlier, only &pdf; documents could be stored as file attachments (and this packet type was called a &pdf; packet instead). Since ®ina; 7.0, any type of file attachment can be stored.

&packetchilddesc;

### Parents

&packetparents;

### Children

Element `attachment` has no children that are specific to attachment packets.

&packetchildren;

## Attributes

The following attributes are specific to attachment packets:

`encoding`

- Specifies how the contents of the file attachment are encoded in printable format. Possible values are `base64` (indicating a base64 encoding with printable character set `A-Za-z0-9+/`), or `null` (indicating that the attachment is empty, i.e., a zero-byte file).

`filename`

- The filename associated with this attachment. Typically this would be a filename only, with no directory prefixes.

  User interfaces should use this filename to deduce the file type, and in particular to choose an appropriate external viewer if required.

  This filename should be treated as a hint only. User interfaces are not required to use it, and indeed they will have to change it if the filename is empty or invalid for the current platform.

&packetattrdesc;