赞
踩
官网参照文档地址:官网参照文档地址
下载照片文件:
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
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。