Skip to main content

File

This page is auto-generated from the formations OpenAPI spec. Do not edit manually — run pnpm generate-formations-resource-docs to regenerate.

Registers a file record within the formation's project.

Syntax​

type: file
properties:
prefix: String
filename: String
content_type: String
size: Integer
metadata: Any

Output​

The physical resource ID is the public ID of the created resource. Reference it from other resources with a ref expression:

some_field:
ref: MyFile

Properties​

prefix

Directory within the project. Optional; defaults to / (root). Combined with filename to form the file's key (path).

Required: No Type: String Nullable: Yes


filename

Original / download name and the key's leaf segment.

Required: No Type: String Nullable: Yes


content_type

MIME type of the file

Required: No Type: String Nullable: Yes


size

File size in bytes

Required: No Type: Integer Nullable: Yes


metadata

Caller-owned annotations on the file, stored as the object they were written as; null clears the bag. Keys are stored and returned verbatim in the casing supplied.

Required: No Type: Any