File
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
typestringAlways
file. In a list, it tells a file from a folder. See Entry.bucketstringThe ID of the bucket that holds it. The ID never changes, even when the bucket is renamed.
keystringIts name and place in the bucket, such as
2026/0001.pdf. Join the bucket’s name and the key with/to get its path.sizenumberIts size in bytes.
contentTypestringIts media type, such as
application/pdf.etagstringChanges whenever the file’s contents change.
publicUrlstringOnly in a public bucket. The file’s permanent public address. See Share files publicly.
sha256stringThe SHA-256 digest sent with the upload, as 64 hexadecimal characters. Missing when none was sent, such as after a write with
verify: false.createdAtstringWhen a file was first stored at this key, as an ISO 8601 date and time.
updatedAtstringWhen the file at this key was last replaced, as an ISO 8601 date and time.
Returned by
space.fs.write()space.fs.stat()space.fs.copy()space.fs.move()space.fs.list(), as an Entry withtypeset tofile
Last updated