Child pages
  • JSMedia

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Divcache
Div
iddescription
HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summary
Table Row (tr)
Table Cell (td)
byte[]
Table Cell (td)bytes
styleindexdisplay:none

DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.

true
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClient

servoy sSummary12%30%58%height: 30px;3Property SummaryA byte array holding the content of the Media object. Table Row (tr)

Table Cell (td)
String
Table Cell (td)mimeType
The MIME type of the Media object.table

id

classservoy sSummary

Colgroup Tag
Col
width80px
Col
Table Head (thead) Table Row (tr)style Table Row (tr)
Table Cell (td)
String
Table Cell (td)getName()
servoy sSummary12%30%58%height: 30px;
Table Head (th)
colspan2
Method Summary
3Methods SummaryThe name of the Media object. Table Row (tr)
Table Cell (td)
UUID
Table Cell (td)getUUID()
Returns the UUID of this mediatable

id

propertyclass Colgroup Tag Colcolspanservoy sDetail2width100%

Col
Table Head (thead) Table Row (tr)styleheight:30px; Table Head (th)colspan2Property Details Table Body (tbody)ididbytes Table Row (tr)name

Table Cell (td)id

bytes

Table Row (tr)des Table Cell (td) DivclasssIndentA byte array holding the content of the Media object. Table Row (tr)idtdret

Returns

div Table Body (tbody)
idmimeType
Table Row (tr)
idname
Table Cell (td)

mimeType

Table Row (tr)
iddes
Table Cell (td) Div
classsIndent
sIndentclients

classsIndent
byte[]
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var ballBytes = plugins.file.readFile('d:/ball.jpg');
var mapBytes = plugins.file.readFile('d:/map.png');
var ballImage = solutionModel.newMedia('ball.jpg', ballBytes);
application.output('original image name: ' + ballImage.getName());
ballImage.bytes = mapBytes;
ballImage.mimeType = 'image/png';
application.output('image name after change: ' + ballImage.getName()); // The name remains unchanged. Only the content (bytes) are changed.
application.output('image mime type: ' + ballImage.mimeType);
application.output('image size: ' + ballImage.bytes.length);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
mimeTypename

mimeType

dessIndentThe MIME type of the Media object.
Some examples are: 'image/jpg', 'image/png', etc. Table Row (tr)idret

Table Cell (td)

Returns

divsIndentclients

classid

Supported Clients

sIndent
String Table Row (tr)SmartClient,WebClient,NGClientsam

Table Cell (td)

Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Details
Table Body (tbody)
idgetName
Table Row (tr)
idname
Table Cell (td)

getName

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
getName
Span
()
Table Row (tr)
iddes
Table Cell (td) Div
classsIndent

Sample

Div
classsIndent
Code Block
languagejavascript
var ballBytes = plugins.file.readFile('d:/ball.jpg');
var mapBytes = plugins.file.readFile('d:/map.png');
var ballImage = solutionModel.newMedia('ball.jpg', ballBytes);
application.output('original image name: ' + ballImage.getName());
ballImage.bytes = mapBytes;
ballImage.mimeType = 'image/png';
application.output('image name after change: ' + ballImage.getName()); // The name remains unchanged. Only the content (bytes) are changed.
application.output('image mime type: ' + ballImage.mimeType);
application.output('image size: ' + ballImage.bytes.length);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
HTML Table
idfunction
classservoy sDetail
sIdentjavascriptlastDetailRow 

functionservoy sDetail2100%height:30px2Methods DetailsgetNamename

getName()

dessIndentThe name of the Media object.
Table Row (tr)idret

Table Cell (td)

Returns

div Table Body (tbody)
idgetUUID
Table Row (tr)
idname
Table Cell (td)

getUUID

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
UUID
Span
stylefont-weight: bold;
getUUID
Span
()
Table Row (tr)
iddes
Table Cell (td) Div
classsIndent
sIndentclients

classsIndent
String - A String holding the name of this Media object.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var ballBytes = plugins.file.readFile('d:/ball.jpg');
var mapBytes = plugins.file.readFile('d:/map.png');
var ballImage = solutionModel.newMedia('ball.jpg', ballBytes);
application.output('original image name: ' + ballImage.getName());
ballImage.bytes = mapBytes;
ballImage.mimeType = 'image/png';
application.output('image name after change: ' + ballImage.getName()); // The name remains unchanged. Only the content (bytes) are changed.
application.output('image mime type: ' + ballImage.mimeType);
application.output('image size: ' + ballImage.bytes.length);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 

Supported Clients

sIndentSmartClient,WebClient,NGClient
sam

Sample

sIdentjavascript
lastDetailRow 
getUUIDname

getUUID()

dessIndentReturns the UUID of this media
Table Row (tr)idret

Table Cell (td)

Returns

divsIndentclients

classid

Supported Clients

sIndent
UUID Table Row (tr)SmartClient,WebClient,NGClientsam

Table Cell (td) Table Row (tr)

classlastDetailRow
Table Cell (td) 

Sample

Div
classsIndent
Code Block
languagejavascript
var ballImg = plugins.file.readFile('d:/ball.jpg');
application.output(ballImg.getUUID().toString());
sIdentjavascriptlastDetailRow