Commit fc8c509a authored by 黄奎's avatar 黄奎

11

parent a8a04482
...@@ -76,7 +76,8 @@ namespace Mall.ThirdCore.Oss ...@@ -76,7 +76,8 @@ namespace Mall.ThirdCore.Oss
{ {
string fileExtention = System.IO.Path.GetExtension(filePath); string fileExtention = System.IO.Path.GetExtension(filePath);
string bucket = this.bucketName; //存储桶,格式:BucketName-APPID string bucket = this.bucketName; //存储桶,格式:BucketName-APPID
string key = @"/YB2024/Goods/"+DateTime.Now.Ticks.ToString()+fileExtention; //对象在存储桶中的位置,即称对象键
string key = @"/SaleBefore/Goods/" + DateTime.Now.Ticks.ToString() + fileExtention; //对象在存储桶中的位置,即称对象键
PutObjectRequest request = new PutObjectRequest(bucket, key, filePath); PutObjectRequest request = new PutObjectRequest(bucket, key, filePath);
//设置签名有效时长 //设置签名有效时长
request.SetSign(TimeUtils.GetCurrentTime(TimeUnit.SECONDS), 600); request.SetSign(TimeUtils.GetCurrentTime(TimeUnit.SECONDS), 600);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment