The Servoy Blobloader provides a convenient way to access files stored in a database column or variable and use it as if it were part of the Servoy Media library.

In the latest 3.1 beta's more functionality has been added, so if you have a global containing a file, you can use that as well, you can set the mime-type and filename as well.

for example, if you create a calculation with the following code, and place a HTML Area on your form with the Calc as DataProvider, then, in the WebClient, clicking the link would open the file.

Code: Select all
var URL = 'media:///servoy_blobloader?servername=' + currentcontroller.getServerName() + '&tablename=XXXXX&dataprovider=YYYYY&rowid1=' + ZZZZZ+'&mimetype='AAAAA'&filename='+BBBBBB
return '<html><body><a target="_blank" href="'URL'">test</a></body></html>';

Where: