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: String

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

JSON string with additional metadata

Required: No Type: String Nullable: Yes