Search…
Downloading files
How to download files in Cased Shell.
Downloading a file in Cased Shell is simple - it only takes two steps.
Downloading files with Cased Shell.
Once a user is in the host or container of their liking, the user must click the "Download a File" button on the top right of the terminal interface.
Then the user must simply enter the file path and press download.
That's it! The file will be downloaded and will pop up in your browser's download bar.

Example of downloading presets through containers

With Jump, set a preDownloadCommand:
1
queries:
2
- provider: static
3
prompt:
4
# This prompt provides easy access to a running container named 'utility' on the
5
# example.com server.
6
name: utility container
7
hostname: example.com
8
jumpCommand: docker exec -it utility
9
10
# To allow users accessing this shell to download files from inside the container
11
# instead of from the example.com server they are connected to, Cased Shell supports
12
# running a command on the server before downloading a file using the `preDownloadCommand`
13
# field.
14
15
# The tokens `{filepath}` and `{filename}` will be replaced with the path and basename
16
# of the file to download. The command is expected to output the full path to the file
17
# on the server to stdout. In this example, we create a directory, extract the file from
18
# the running container with `docker cp`, and then output the full path to the file.
19
preDownloadCommand: |
20
sh -c 'mkdir -p /tmp/cased-downloads; docker cp utitlity:{filepath} /tmp/cased-downloads/; echo /tmp/cased-downloads/{filename}'
21
22
Copied!