Implement file upload and streaming from stat lab.