}
private OssFile ossUpload(String key, InputStream inputStream, ObjectMetadata metadata) {
OssFile result = null;
try {
PutObjectResult putObjectResult = ossClient.putObject(bucket, key, inputStream, metadata);
result = new OssFile(putObjectResult.getETag());
result.setUrl(endpoint + Constant.SLASH + bucket + Constant.SLASH + key);
result.setSize(metadata.getContentLength());
result.setContentType(metadata.getContentType());
} catch (OSSException e) {
result = new OssFile(e.getErrorCode(), e.getMessage());