Federate write, end, and enforceMaxBytes methods in UploadStream.