basalt / drives/src / filesSink
Function: filesSink()
> filesSink(files, options?): DriveSink
Defined in: drives/src/import.ts:106
A sink that streams the item straight into @basaltkit/files.
This is the composition the whole design is pointed at: Files.upload already caps the size mid-stream, hashes with SHA-256 as the bytes pass, sniffs the real type on the first 64 KiB (rejecting bytes that contradict the declared type), enforces the tenant quota and — on a driver with putStream — writes straight through to the backend without ever holding the file. None of that is re-implemented here; an external file gets exactly the same treatment an uploaded one does, which is the point.
Parameters
files
options?
uploadedBy?
string