move oss code to box-core.js