cuba-platform / documentation

CUBA Platform Documentation
https://www.cuba-platform.com
Creative Commons Attribution 4.0 International
25 stars 45 forks source link

How to add a static downloadable file (without authentication) to the project #731

Closed alexbudarov closed 3 years ago

alexbudarov commented 3 years ago

Description of the bug or enhancement

It turns out that we don't have any instructions about how one can add a static file (logo, image, doc file with terms & conditions) that can be freely downloadable by everyone by some simple URL without authentication, without REST, without file descriptors.

See topic "Дурацкий вопрос. Как получить файл с сайта?" on the russian forum.

e.g. folder where I can just put some files like with any usual web site, and refer to them and view them? example like mentioned above - http://localhost:8080/files/Price.doc ?

Solution:

store static files inside of project in modules/web/web/VAADIN. Then file is accessible by URL http://localhost:8080/app/VAADIN/{fileName}

sample project: rest-files.zip