The first step is to add the thumbnail to the app and save the app so that the thumbnail becomes embedded in the qvf file.
The last step is to list the media files and check that the thumbnail URL is correct.
1. Add the thumbnail Qlik_default_feathers.png to the app. The handle of the app is 1.
The client sends:
{
"jsonrpc": "2.0",
"id": 2,
"method": "SetAppProperties",
"handle": 1,
"params": [
{
"qThumbnail": "/content/default/Qlik_default_feathers.png"
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 2,
"result": {}
}
The thumbnail is added.
SetAppProperties Method.
2. Save the app.
The client sends:
{
"jsonrpc": "2.0",
"id": 3,
"method": "DoSave",
"handle": 1,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 3,
"result": {},
"change": [
1
]
}
The thumbnail is now embedded in the qvf file.
DoSave method.
3. List the media files. Check that the URL of the image Qlik_default_feathers.png links to the media folder.
The client sends:
{
"jsonrpc": "2.0",
"id": 4,
"method": "GetMediaList",
"handle": 1,
"params": []
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"qReturn": true,
"qList": {
"qItems": [
{
"qUrlDef": "/content/default/Qlik_default_feathers.png",
"qUrl": "/content/default/Qlik_default_feathers.png"
},
{
"qUrlDef": "/content/default/Qlik_default_flower.png",
"qUrl": "/content/default/Qlik_default_flower.png"
},
{
"qUrlDef": "/content/default/Qlik_default_green.png",
"qUrl": "/content/default/Qlik_default_green.png"
},
{
"qUrlDef": "/content/default/Qlik_default_leaf.png",
"qUrl": "/content/default/Qlik_default_leaf.png"
},
{
"qUrlDef": "/content/default/Qlik_default_orange.png",
"qUrl": "/content/default/Qlik_default_orange.png"
},
{
"qUrlDef": "/content/default/Qlik_default_plant.png",
"qUrl": "/content/default/Qlik_default_plant.png"
},
{
"qUrlDef": "/content/default/Qlik_default_qlikCircles.png",
"qUrl": "/content/default/Qlik_default_qlikCircles.png"
},
{
"qUrlDef": "/content/default/movies%20-%20cover%20image.png",
"qUrl": "/content/default/movies%20-%20cover%20image.png"
},
{
"qUrlDef": "/content/default/movies%20-%20fruit.png",
"qUrl": "/content/default/movies%20-%20fruit.png"
},
{
"qUrlDef": "/content/default/movies-colors.png",
"qUrl": "/content/default/movies-colors.png"
},
{
"qUrlDef": "/content/default/movies_thumbnail.png",
"qUrl": "/content/default/movies_thumbnail.png"
},
{
"qUrlDef": "/content/default/thumb-executive_dashboard.png",
"qUrl": "/content/default/thumb-executive_dashboard.png"
},
{
"qUrlDef": "/content/default/thumb-helpdesk_management.png",
"qUrl": "/content/default/thumb-helpdesk_management.png"
},
{
"qUrlDef": "/content/default/thumb-sales_discovery.png",
"qUrl": "/content/default/thumb-sales_discovery.png"
},
{
"qUrlDef": "/media/6247aeb3-7952-4de8-9baa-5802bf2154dd/Qlik_default_feathers.png",
"qUrl": "/media/e4b18409a57fb30e2ced854d828923f4/6247aeb3-7952-4de8-9baa-5802bf2154dd/Qlik_default_feathers.png"
}
The list of the media files is displayed.
GetMediaList method.
Media files located:
- in the /content/default/ folder are outside the qvf file.
- in the /media/ folder are embedded in the qvf file.
In this example, the image Qlik_default_feathers.png is embedded in the qvf file (qUrlDef": "/media/6247aeb3-7952-4de8-9baa-5802bf2154dd/Qlik_default_feathers.png). This image is also stored on the desktop ( "qUrlDef": "/content/default/Qlik_default_feathers.png").
For more information about qMediaList, see MediaList.