Whitebeam Object Definition

Site Map
 
Home
 
Application Guide
Reference
  Installation
  Configuration
  XML Markup
  JavaScript Classes
  ROM
  Templates
  Environment
  Dev Process
  Tools
  External Links
  Example libraries
Community
Contact Whitebeam
To-Do
Download
Credits
Licence
Whitebeam Users
 
 
 

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
mineTypestring  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!

Whitebeam release 1.3.36
(loadtime : 27ms)