response (expires : int, [filename : string], [dispositionType : string]) : void
The method “response” makes it possible to send binary data.
The first example shows how data can be sent from elements.
In the example, the XML data for the graphic is sent as a first step and then the binary data is sent via “b: output”. The mimetype is determined here from the element itself.
Data can also be sent from the file system however. The second example shows how this works.
In the second example, a file is sent from the file system.
An XML stream must be sent first of all in order for the sending of the file to work.
The parameter “dispositionType” should be specified. “inline” is defined as the default value. Browsers can have problems with this value however.
A further value would be “attachment” in order to provide the user with the option "display" or "save".