replaceUploadedFile(filePath: string,data: Uint8Array): Promise<void>
Writes data to filePath, replacing whatever is there only once the whole
file is written, so a failed write leaves the old file whole. The upload
routes call it before recording the new file, so that clients told of it
never fetch it early.
data: Uint8Array