Skip to main content

What is Storage?

Storage is Triform’s built-in file management system that enables your Actions to save and retrieve files. Whether you’re processing documents, generating reports, or handling uploads, Storage provides a simple, secure way to work with files in your workflows.

Key Features

  • S3-Compatible — Works with any S3-compatible storage backend
  • Project-Scoped — Files are isolated per project for security
  • Simple API — Two functions: save_file() and get_file()
  • Automatic Authentication — No manual credential management needed
  • Secure by Default — Encrypted storage with proper access controls

Using Storage in Actions

Saving Files

Use save_file() to store a file in your project’s storage:
Parameters:
  • filename — Name for the file (including extension)
  • content — File content (bytes, string, or file-like object)
  • content_type — MIME type of the file (optional, auto-detected if omitted)

Retrieving Files

Use get_file() to retrieve a previously saved file:
Parameters:
  • file_path — The path returned from save_file() or provided via input

Common Patterns

Pattern 1: Document Processing Pipeline

Pattern 2: Report Generation

Pattern 3: Image Processing

File Upload via API

You can upload files to your projects via the FormData API:
The response includes the file path you can use in subsequent action executions.

Storage Configuration

Storage is configured at the project level via Modifiers:
  1. Go to Project → Properties → Modifiers
  2. Click Add Modifier → Storage
  3. Configure your storage backend (S3 credentials, bucket, region)
  4. Save
Once configured, all Actions in the project can use save_file() and get_file().

Storage Limits

Security

  • Encryption at Rest — All files are encrypted in storage
  • Encryption in Transit — HTTPS for all file transfers
  • Project Isolation — Files are scoped to projects, preventing cross-project access
  • Access Control — Only authenticated Actions within the project can access files
  • Credential Management — Storage credentials are managed by Triform, never exposed to Actions

Best Practices

Use meaningful filenames — Include dates, IDs, or descriptive names for easier debugging
Clean up temporary files — Remove files you no longer need to save storage
Handle large files carefully — Stream large files rather than loading entirely into memory
Check file existence — Handle cases where files may not exist gracefully

Troubleshooting

Problem: save_file() fails with permission error
Solution: Check that storage modifiers are configured for your project
Problem: get_file() returns empty or None
Solution: Verify the file path is correct and the file exists
Problem: File uploads timeout
Solution: For large files, consider chunked uploads or compression

Next Steps

  • Learn about Modifiers for configuring storage
  • See Actions for using storage in your code
  • Check Tutorials for end-to-end examples