basalt / files/src / toPublicFile
Function: toPublicFile()
> toPublicFile(record): PublicFileRecord
Defined in: files/src/plugin.ts:148
The default public projection of a FileRecord — see PublicFileRecord. Exported so an app that writes its own routes (or a present that adds one field) answers with the same shape.
ts
fileRoutes({ shared: true, present: (file) => ({ ...toPublicFile(file), uploadedBy: file.uploadedBy }) })