Disk

The disk filesystem gives access to the actual directory that has been provided in the configuration as storage.disk.dir. It accessible only for retrieval via HTTP under /.

curl http://127.0.0.1:8080/path/to/a/file.txt -o file.txt

Given that the requested file exists, the returned Content-Type is based solely on the file extension. For a list of known mime-types and their extensions see storage.mime_types in the configuration.

Access

API

The contents of the disk filesystem at / are also accessible via the API in the same way as described above, but with the same protection as the API (see API-Security configuration) for all operations. It is also possible to list all files that are currently in the filesystem.

Create, Update

Example:

echo 'test' > example.txt && \
curl http://127.0.0.1:8080/api/v3/fs/disk/example.txt \
   -d @example.txt \
   -X PUT

After the successful upload the file is available at /example.txt and /api/v3/fs/disk/example.txt.

Description:

Read

List all files

Listing all currently stored files is done by calling /api/v3/fs/disk. It also accepts the query parameters pattern, sort (name, size, or lastmod) and order (asc or desc). If none of the parameters are given, all files will be listed sorted by their last modification time in ascending order.

With the pattern parameter you can filter the list based on a glob pattern, with the addition of the ** placeholder to include multiple subdirectories, e.g. listing all .ts file in the root directory has the pattern /*.ts, listing all .ts file in the whole filesystem has the pattern /**.ts.Example:

curl "http://127.0.0.1:8080/api/v3/fs/disk?sort=name&order=asc" \
   -X GET

Description:

Download a file

For downloading a file you have to specify the complete path and filename. The Content-Type will always be application/data.

Example:

curl http://127.0.0.1:8080/api/v3/fs/disk/example.txt \
   -X GET

Description:

Delete

For deleting a file you have to specify the complete path and filename.

Example:

curl http://127.0.0.1:8080/api/v3/fs/disk/example.txt \
   -X DELETE

Description:

Configuration

Disk

Last updated