File Provider Component
Enables access to files in a server directory through HTTP. If a file specified in the request exists, its content is sent in a response.
The response depends on the file type:
-
For recognizable files (for example,
.txt
or.xml
), the browser displays the file contents as text. -
For non-recognizable files (for example,
.profile
), the browser offers to download the file.
For example, if HTTP Dispatcher contains a definition of the default
listener on the port 8888, setting the File Provider component listeners="default"
and location="files"
exposes the files at http://myserver:8888/files
.
To enable access to files located in the directory
folder, set filesDirectory="directory"
.
Then, a request to http://myserver:8888/files/subdirectory/file.txt
returns the contents of file.txt
from the directory/subdirectory
folder.
The component does not allow listing.
In other words, in the previous example, a request to http://myserver:8888/files does not return the filesystem structure.
|
<component class="com.ataccama.dqc.web.FileProviderComponent">
<disabled>false</disabled>
<listeners>default</listeners>
<location>/files</location>
<filesDirectory>../directory</filesDirectory>
</component>
Property | Value | Required | Description |
---|---|---|---|
filesDirectory |
N/A |
No |
Relative (to the server configuration file) or absolute path to the root directory of the exposed filesystem.
You can access any file located in the |
listeners |
N/A |
Yes |
Comma-separated list of names of HTTP listeners where the service should be accessible. |
location |
N/A |
Yes |
Path to the location within the listener where the service should be accessible.
The path has to start with a forward slash, for example, |
Was this page useful?