Adding eos support to UploadToCastor()