ObjectContent Property  
 

Gets the content type for the current object.

Syntax

object.ObjectContent

Remarks

This property returns a string which specifies the MIME content type for the current storage object. The content type is typically determined by the object label and evaluating the contents of the object. It is also possible for the application to explicitly specify the content type of the object when it is created.

The object content type will always be in the format type/subtype where the type specifies a common media type (e.g.: text, audio, video, etc.) and subtype specifies the specific content. The most common content type for text files is text/plain. If the content type is unknown, the default content type is application/octet-stream.

Text objects may also optionally include the character encoding as part of the content type. For example, if an object contains UTF-8 encoded text, the content type may be returned as text/plain; charset=utf-8. If your application is parsing the content types, you must check if a character encoding was also included in the value. Text objects that do not specify an encoding either contain ASCII or text which uses the system code page. Unicode text will always be stored using UTF-8 encoding.

Data Type

String

See Also

Exists Method, PutData Method, PutFile Method