Class TencentCos

java.lang.Object
com.bytedesk.core.upload.cloud.TencentCos

@Component public class TencentCos extends Object
腾讯云对象存储
Author:
bytedesk.com on 2019/4/4
See Also:
  • Field Details

    • bucketLocation

      @Value("${tencent.bucket.location:}") private String bucketLocation
    • bucketName

      @Value("${tencent.bucket.name:}") private String bucketName
    • bucketDomain

      @Value("${tencent.bucket.domain:}") private String bucketDomain
    • appId

      @Value("${tencent.appid:}") private String appId
    • secretId

      @Value("${tencent.secretid:}") private String secretId
    • secretKey

      @Value("${tencent.secretkey:}") private String secretKey
    • uploadDirPrefix

      @Value("${upload.dir.prefix:}") private String uploadDirPrefix
  • Constructor Details

    • TencentCos

      public TencentCos()
  • Method Details

    • uploadAttachment

      public String uploadAttachment(org.springframework.http.MediaType mediaType, String fileName, int width, int height, String username, File file)
    • uploadAvatar

      public String uploadAvatar(String fileName, File file)
    • uploadImage

      public String uploadImage(String fileName, File file)
    • uploadVoice

      public String uploadVoice(String fileName, File file)
    • uploadVideo

      public String uploadVideo(String fileName, File file)
    • uploadFile

      public String uploadFile(String fileName, File file)
    • uploadP12

      public String uploadP12(String fileName, String build, File file)
      上传p12文件
      Parameters:
      fileName - 文件名
      build - debug or release
      file - file
      Returns:
      string
    • uploadCommon

      private String uploadCommon(String folder, String fileName, File file)
      简单文件上传, 最大支持 5 GB, 适用于小文件上传, 建议 20 M 以下的文件使用该接口 大文件上传请参照 API 文档高级 API 上传
      Parameters:
      folder - folder
      fileName - filename
      file - locale
      Returns:
      string