Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process object #90

Merged
merged 8 commits into from
Jun 29, 2017
Merged

process object #90

merged 8 commits into from
Jun 29, 2017

Conversation

baiyubin
Copy link
Contributor

@baiyubin baiyubin commented Jun 15, 2017

变更内容

  • 添加:支持processObject接口
  • 修复:doesObjectExist使用GetObjectMeta实现
  • 修复:createUdfApplication去掉 IoOptimized 字段
  • 修复:createSymlink无法设置链接文件的元信息
  • 修复:uploadFile默认没有设置ContentType

@1019272778
Copy link

public boolean doesObjectExist(GenericRequest genericRequest)
throws OSSException, ClientException {
try {
getSimplifiedObjectMeta(genericRequest);
return true;
} catch (OSSException e) {

  •        if (e.getErrorCode().equals(OSSErrorCode.NO_SUCH_BUCKET)
    
  •                || e.getErrorCode().equals(OSSErrorCode.NO_SUCH_KEY)) {
               return false;
           }
           throw e;
    
    }
    这里建议改为return getSimplifiedObjectMeta(genericRequest)

return getMimetype(file.getName(), key);
}

public String getMimetype(String primaryObject, String secondaryObject) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public String getMimetype(String primaryObject, String secondaryObject)
public String getMimetype(String fileName) {
这两个函数,可以重构一下,避免代码重复

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@baiyubin baiyubin merged commit 98d5626 into master Jun 29, 2017
@baiyubin baiyubin deleted the process-object branch October 27, 2017 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants