当前位置:   article > 正文

腾讯云上传、下载_腾讯微云api

腾讯微云api

官网参照文档地址:官网参照文档地址

下载照片文件:

public class TencentCloudClientHelper
    {

        #region 下载自然注册证件照片
        public string DownImage(string path)
        {

            TencentModel model = new TencentModel();
            model.AppID = System.Configuration.ConfigurationManager.AppSettings["OP_AppID"].ToString();
            model.Region = System.Configuration.ConfigurationManager.AppSettings["OP_Region"].ToString();
            model.SecretID = System.Configuration.ConfigurationManager.AppSettings["OP_SecretID"].ToString();
            model.SecretKey = System.Configuration.ConfigurationManager.AppSettings["OP_SecretKey"].ToString();
            model.BucketName = System.Configuration.ConfigurationManager.AppSettings["OP_BucketName"].ToString();
            model.Arn = System.Configuration.ConfigurationManager.AppSettings["OP_Arn"].ToString();
            model.RoleName = System.Configuration.ConfigurationManager.AppSettings["OP_RoleName"].ToString();
            model.CosKey = "{文件路径,需要提前开read权限}";
            string localDir = AppDomain.CurrentDomain.BaseDirectory;//本地文件夹
            string localFileName = path.Split('/')[2].ToString();//指定本地保存的文件名
            return DownloadTencentFileByKey(model, path, localDir, localFil
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/649636
推荐阅读
相关标签
  

闽ICP备14008679号