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
Overview
Content Tools
Activity