Child pages
  • servoy_blobloader
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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:

  • XXXXX is the name of the table your file is stored in
  • YYYYYY is the columnname of the column where the file is stored
  • ZZZZZ is value of the PK field of the row (In case of a PK buildup out of multiple columns, add &rowid2=value ... &rowidXX=value)
  • AAAAA is the mimetype of the file
  • BBBBB is the name of the file
  • No labels