Class UploadOptions

java.lang.Object
cn.com.anysdk.oss.api.UploadOptions

public class UploadOptions extends Object
上传选项 用于配置文件上传的额外选项
  • Constructor Details

    • UploadOptions

      public UploadOptions()
  • Method Details

    • publicFile

      public static UploadOptions publicFile()
      创建公开访问的上传选项
      Returns:
      上传选项
    • privateFile

      public static UploadOptions privateFile(Long expireTime)
      创建私有访问的上传选项
      Parameters:
      expireTime - 过期时间(秒)
      Returns:
      上传选项
    • largeFile

      public static UploadOptions largeFile(boolean isPrivate, long partSize)
      创建大文件上传选项
      Parameters:
      isPrivate - 是否为私有文件
      partSize - 分片大小(字节)
      Returns:
      上传选项
    • withContentType

      public static UploadOptions withContentType(String contentType, boolean isPrivate)
      创建带文件类型的上传选项
      Parameters:
      contentType - 文件类型
      isPrivate - 是否为私有文件
      Returns:
      上传选项
    • withAcl

      public static UploadOptions withAcl(String acl, boolean isPrivate)
      创建带访问控制的上传选项
      Parameters:
      acl - 访问控制权限
      isPrivate - 是否为私有文件
      Returns:
      上传选项