Page 1 of 1

LANSA Web-API - Model-B configuration - PDF

Posted: Tue Aug 22, 2023 12:16 am
by Joerg Hamacher
Hi again,

at a customer we have a working Model-B configuration to access JSON-Web-APIs that we've created with VL.
These APIs are located on an IBMi, the webserver is a Windows PC with IIS.
Access to the API is e.g. via an URL like this: https://IBMi-IPadress:portnumber/LANSA-API/Request...

For this Model B configuration, no LANSA HTTP server is active on the IBMi.

Now the customer wants to have access to PDF files that are located in an IFS folder on the same IBMi.
Is it possible to realize an access to a PDF file like https://IBMi-IPadress:portnumber/LANSA-API/PDF/mypdf.PDF?
Which configuration files have to be adapted for this? Can this be done inside of LANSA Web Administrator or in IIS on the webserver PC?

Many thanks in advance,
Joerg

Re: LANSA Web-API - Model-B configuration - PDF

Posted: Wed Aug 23, 2023 10:54 am
by PatrickF
In Multi-tier (Model B) Web Administrator there is an option to get files from a remote backend server https://docs.lansa.com/15/en/lansa085/i ... p_0340.htm

Serve Files from this directory
If Allow Files to be served from Web Server is enabled, you must specify where to fetch the files from. Either choose the default location: {LANSA_INSTALL_ROOT}/tmp/fetch-files or specify a location.
For security reasons, only files within the specified directory will be served.
Note that if you enable this option, you must also enable the corresponding Web Server option.
By default these options are disabled.