|
|
@@ -325,12 +325,12 @@ public partial class supplierBuildFile : System.Web.UI.Page
|
|
|
private string FileOssUp(byte[] buffer, string fileName)
|
|
|
{
|
|
|
// yourEndpoint填写Bucket所在地域对应的Endpoint。以华东1(杭州)为例,Endpoint填写为https://oss-cn-hangzhou.aliyuncs.com。
|
|
|
- var endpoint = "https://oss-cn-fuzhou.aliyuncs.com";
|
|
|
+ var endpoint = "https://oss-cn-hangzhou.aliyuncs.com";
|
|
|
// 从环境变量中获取访问凭证。运行本代码示例之前,请确保已设置环境变量OSS_ACCESS_KEY_ID和OSS_ACCESS_KEY_SECRET。
|
|
|
var accessKeyId = "LTAI5tE7wuNkeT9jZ42bQnyr";
|
|
|
var accessKeySecret = "NnutvWhKl4HbQFSad3HosYbCkEkbjN";
|
|
|
// 填写Bucket名称,例如examplebucket。
|
|
|
- var bucketName = "dfdiyfile";
|
|
|
+ var bucketName = "ltcloudfile";
|
|
|
int year = DateTime.Now.Year;
|
|
|
int month = DateTime.Now.Month;
|
|
|
int day = DateTime.Now.Day;
|
|
|
@@ -338,7 +338,7 @@ public partial class supplierBuildFile : System.Web.UI.Page
|
|
|
var objectName = "supplierFile/" + year + "/" + month + "/" + day + "/" + fileName;
|
|
|
|
|
|
// 填写Bucket所在地域对应的Region。以华东1(杭州)为例,Region填写为cn-hangzhou。
|
|
|
- string region = "cn-fuzhou";
|
|
|
+ string region = "cn-hangzhou";
|
|
|
|
|
|
// 创建ClientConfiguration实例,按照您的需要修改默认参数。
|
|
|
var conf = new ClientConfiguration();
|
|
|
@@ -362,7 +362,7 @@ public partial class supplierBuildFile : System.Web.UI.Page
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- return "https://dfdiyfile.oss-cn-fuzhou.aliyuncs.com/" + objectName;
|
|
|
+ return "https://ltcloudfile.oss-cn-hangzhou.aliyuncs.com/" + objectName;
|
|
|
}
|
|
|
/// 批量进行多个文件压缩到一个文件
|
|
|
/// </summary>
|