Action guide
Track every file that lands in your storage
POST
/v1/events · file.uploadedEmit 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.
| Key | Purpose |
|---|---|
filename | Original filename from the client |
size | File size in bytes |
mimeType | application/pdf, image/png, ... |
storageKey | Object key in your bucket |
Suggested retention
Align with your storage retention policy, usually 12 to 24 months.