Some fixes and improovements for datastream uploads.

Should probably be wrapped in `t()`.