|
Whitebeam Object Definition
|
Method Description
Binary.mime()
Access the mime-type against the Binary object.
Syntax
string = Binary.mime(mineType)
Parameters
The 'Binary.mime' method takes 1 parameter:
Name | Type/Value | Range/Length | Description | mineType | string | | Optional.
The mime-type to store against this Binary object. For example if the
object contans a GIF the mime-type should be set to 'image/gif'.
|
Results
The 'Binary.mime' method returns string:
Type/Value | Range/Length | Description |
string |
  |
The mime type stored against the binary object. If the method changes the mime-type then the modified
value is returned!
|
Remarks
This method returns and optionally modifies the mime-type stored against the binary object.
If the optional mimeType parameter is present then the value is stored against the
binary object. If no parameter is present the method then returns the mime-type. This property is primarily for convenience
and generally avoids the need to have a separate value storing the mime-type. Templates that
take Binary objects in their interface will store the mime-type against the contents and
will correctly regenerate that mime-type when the object is subsequently returned to the caller.
| It is recommended that you store the mime-type against the object as soon as you have the content -
assuming you know what the content is. The Whitebeam system will provide a mime-type where it has
the information - for example in files pushed from clients. The Presentation Engine performs no validation of the mime-type specified. It simply stores
what it is given! |
|
|
(loadtime : 10ms) |