Media
Last updated
Was this helpful?
Last updated
Was this helpful?
The Media
class represents binary data associated with a MIME type and provides various methods to manage and manipulate this data. It stores media content as a blob and offers functionality for retrieving and updating the media content, such as using the getMediaData()
function to lazily load the media or makeBlobPermanent()
to make the data persistent. The class also allows for setting and getting properties like name
and mime type
through the setName()
and getMimeType()
functions, ensuring proper i dentification of the media.
Additionally, the Media
class supports encapsulation levels with setEncapsulation()
and getEncapsulation()
, which help define how the media is exposed in different environments. The class also includes methods for handling deprecation, allowing you to track and manage deprecated media through getDeprecated()
and setDeprecated()
.
By utilizing these features, the Media
class provides support for managing media data, making it easy to handle in the Servoy environment, whether it is for temporary usage or permanent storage with a defined MIME type.
Additional information, such as programmer notes about this model object's purpose.
Gets the deprecation info for this element.
The encapsulation mode of this Media.
The MIME type of the Media object.
The name of the Media object.
Additional information, such as programmer notes about this model object's purpose.
Type
Gets the deprecation info for this element.
Sample
The encapsulation mode of this Media. The following can be used:
- Public (available in both scripting and designer from any module) - Module Scope - available in both scripting and designer but only in the same module.
The MIME type of the Media object.
Some examples are: 'image/jpg', 'image/png', etc.
The name of the Media object.
Type the deprecation info for this object or null if it is not deprecated
Type the encapsulation mode/level of the persist.
Type
Type