From: Krzysztof B. <kb...@un...> - 2017-04-03 17:54:28
|
Hi, W dniu 31.03.2017 o 12:20, Sander Apweiler pisze: > Hi Krzysztof, > > We need to provide some additional files like FAQ or DPS together with > unity. In manual I found the config for WebContents directory, but I > was not able to browse to a file which is stored in this directory. > > Is it possible to store files there and provide them with the webserver > used by unity? Yes, but not in an elegant way. Using Unity as a generic web server was not yet considered. So first of all everything in Unity is accessed in a context of some endpoint. There is one special endpoint, always available, which is accessible under /unitygw path. It won't expose arbitrary files to the world from webContents. However it exposes everything that is in VAADIN directory of webContents. So if you add 'test.txt' to webcontents/VAADIN, you can access it from: https://<unity.host.com>/unitgw/VAADIN/test.txt We can add some other directory mapping easily but currently only such trick will work. Best Krzysztof |