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 3 Next »

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

The Servoy Blobloader is a media URL, with arguments indicating where to retrieve the file from:

Blobloader syntax to retrieve from the database
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>';
Blobloader syntax to retrieve from a global variable
var URL = 'media:///servoy_blobloader?global=''+'&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