The /tmp
directory
Within a workflow, you have full read-write access to the /tmp
directory. You have of available space in /tmp
to save any file.
Managing /tmp
across workflow runs
The /tmp
directory is stored on the virtual machine that runs your workflow. We call this the execution environment (“EE”). More than one EE may be created to handle high-volume workflows. And EEs can be destroyed at any time (for example, after about 10 minutes of receiving no events). This means that you should not expect to have access to files across executions. At the same time, files may remain, so you should clean them up to make sure that doesn’t affect your workflow. Use the tempfile
module to cleanup files after use, or delete the files manually.
Writing a file to /tmp
/tmp/python-logo.png
holds the official Python logo.
Reading a file from /tmp
You can also open files you have previously stored in the /tmp
directory. Let’s open the python-logo.png
file.
Listing files in /tmp
If you need to check what files are currently in /tmp
you can list them and print the results to the Logs section of Results:
Deleting a file
Downloading a file to /tmp
See this example to learn how to download a file to /tmp
.
Uploading a file from /tmp
See this example to learn how to upload a file from /tmp
in an HTTP request.
Downloading a file, uploading it in another multipart/form-data
request
/tmp
limitations
The /tmp
directory can store up to of storage. Also the storage may be wiped or may not exist between workflow executions.
To avoid errors, assume that the /tmp
directory is empty between workflow runs. Please refer to the disk limits for details.
Are File Stores helpers available for Python to download, upload and manage files?At this time no, only Node.js includes a helper to interact with the File Store programmatically within workflows.