More changes to support media uploads over API.