get-mime-content-disposition-param
Returns the parameter param from the "Content-Disposition" header of a stream if such header and parameter exists; otherwise, it returns the value of the default argument. This function can be used to receive messages that follow the optional AS2 profile FileName preservation (FN) to extract the original file name from the MIME header.
Signature
get-mime-content-disposition-param(s:stream, param:string, default:string="") -> string |
Parameters
Name | Type | Description |
---|---|---|
s | stream | Specifies the input stream. |
param | string | Specifies the name of the parameter to return. |
default | string | Specifies the value to return when the specified param and header do not exist. By default, this is an empty string. |
Examples
Assuming that stream msg contains the header Content-Disposition: attachment; filename="GETMSG.edi", the following expression will return "GETMSG.edi":
get-mime-content-disposition-param(msg, "filename") |