File Resources
Introduction
The File manager allows to add files to the solution, these files can be programmatically accessed and used by the solution.
It is possible to upload a variety of file formats; only files added to /script_lib
can be programmatically accessed by the solution while files stored in the root path /
are accessible publicly for anyone who knows the engine URL, so be careful when placing files here, especially if they contain sensitive data! Learn more about the file types and publish locations further below.
Files in a solution are not shared by other solutions; they only exist in the solution they were added to. When the solution is published, the published solution includes all the uploaded files.
View of File Resources
Basics
Open - view or download
Create
Edit properties
Edit file resource
Save
Close
Delete
Filter
Details
File types and publish locations
Teneo Studio allows to upload a variety of different file formats, such as Groovy scripts, compiled .jar files, as well as text-based formats such as .txt or .csv, .html, and even images files. Below please find a few examples of file types which can be added as a Resource File.
- .jar files:
.jar
files can contain classes available through scripts in a solution, .jar files' Published Location should be set to/script_lib
. - .groovy files: Groovy classes can be added by storing the class as a
.groovy
file with the name of the class; the file's Published Location must be/script_lib
. When added and saved, the class can be called from anywhere in the solution. It is not needed to compile the class as it compiles when the solution is loaded in memory. - .jsp files: Java Server Pages can be used to format the Teneo Engine response and can be used by using the URL parameter
viewtype
with the name of the JSP without the extension in request to Engine; the JSP can make use of the Teneo Engine scripting API and the Published Location of a JSP is by defaults the/views
folder. - Images: images files, such as
.jpg
,.png
or.gif
are stored in the Published Location/images
by default; once the solution is published, the images can be retrieved by appending/images/[image_name].[extension]
to the Engine URL. - Other file types, such as
.csv
,.txt
,.xls
,.zip
,.json
,.prop
, etc., can also be added to a solution and for the mentioned file extensions all share the Published Location/script_lib
.