Problem
I need to receive images through an input type element contained in an HTML form, process them through a Lycia web service and further save to a database into a BLOB type field.
Once an image is saved to the database, I need to call it back through another web service and send it back to the HTML document to show it in an image tag (<img src=”” alt=”” >).
Solution
There are 2 options:
Use the fgl_upload() and fgl_download() functions
Use the BLOB Viewer widget
Both work in LyciaWeb and LyciaDesktop.
Though, to enable file upload/download in Lycia Web, you need to use the TextField with predefined class FileUpload
If UI is coded in other than 4GL language, and 4GL is used for business logic accessed only via WebAPI, the same server program will work. To access blob fields, use /blob URL
Related articles
Add Comment