Action guide

Track every file that lands in your storage

POST/v1/events · file.uploaded

Emit a `file.uploaded` event after a file is committed to your object storage. Store the filename, size and mime type so you can answer 'who uploaded this PDF last week'.

When to emit

After the final storage write (S3, R2, GCS), when you assign the file its internal id.

Example payload
await recalled.events.create({
  action: "file.uploaded",
  actor: { id: user.id, email: user.email },
  organization: user.organizationId,
  metadata: {
    filename: "value",
    size: "value",
    mimeType: "value"
  },
});
Metadata to include

Keep metadata flat and consistent across your service so it plays well with search and CSV exports.

KeyPurpose
filenameOriginal filename from the client
sizeFile size in bytes
mimeTypeapplication/pdf, image/png, ...
storageKeyObject key in your bucket
Suggested retention

Align with your storage retention policy, usually 12 to 24 months.

Related actions