A stored file’s bucket, key, size, media type, digest, and times.

A file stored in a bucket, as space.fs gives it back. Its type in the package is StoredFile, and it holds the file’s details, never its contents.

{
  "type": "file",
  "bucket": "01m3c081d2wj4g63qcr53pa1yh",
  "key": "2026/0001.pdf",
  "size": 48213,
  "contentType": "application/pdf",
  "etag": "5d41402abc4b2a76b9719d911017c592",
  "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "createdAt": "2026-09-26T09:30:00Z",
  "updatedAt": "2026-09-26T09:30:00Z"
}

Fields

typestringRequired

Always file. In a list, it tells a file from a folder. See Entry.

bucketstringRequired

The ID of the bucket that holds it. The ID never changes, even when the bucket is renamed.

keystringRequired

Its name and place in the bucket, such as 2026/0001.pdf. Join the bucket’s name and the key with / to get its path.

sizenumberRequired

Its size in bytes.

contentTypestringRequired

Its media type, such as application/pdf.

etagstringRequired

Changes whenever the file’s contents change.

publicUrlstring

Only in a public bucket. The file’s permanent public address. See Share files publicly.

sha256string

The SHA-256 digest sent with the upload, as 64 hexadecimal characters. Missing when none was sent, such as after a write with verify: false.

createdAtstringRequired

When a file was first stored at this key, as an ISO 8601 date and time.

updatedAtstringRequired

When the file at this key was last replaced, as an ISO 8601 date and time.

Returned by

Last updated