|
@@ -1,8 +1,7 @@
|
|
#!/bin/bash
|
|
#!/bin/bash
|
|
-
|
|
|
|
-host="oss-cn-shanghai.aliyuncs.com"
|
|
|
|
-inner_host="oss-cn-shanghai-internal.aliyuncs.com"
|
|
|
|
-bucket="third-part-tool"
|
|
|
|
|
|
+host="oss-cn-hangzhou.aliyuncs.com"
|
|
|
|
+inner_host="oss-cn-hangzhou-internal.aliyuncs.com"
|
|
|
|
+bucket="mooctest-share"
|
|
Id="LTAI4FdrT3HsfdR5edBVN7ws"
|
|
Id="LTAI4FdrT3HsfdR5edBVN7ws"
|
|
Key="yroxrpm46DzTyzHrLBZzS3MRNIicP6"
|
|
Key="yroxrpm46DzTyzHrLBZzS3MRNIicP6"
|
|
# 参数1,PUT:上传,GET:下载
|
|
# 参数1,PUT:上传,GET:下载
|
|
@@ -12,8 +11,8 @@ source=$2
|
|
# 参数3,上传时为OSS目标文件路径,下载时为本地目标文件路径
|
|
# 参数3,上传时为OSS目标文件路径,下载时为本地目标文件路径
|
|
dest=$3
|
|
dest=$3
|
|
|
|
|
|
-osshost=$bucket.$host
|
|
|
|
-#osshost=$bucket.$inner_host
|
|
|
|
|
|
+osshost=$bucket.$inner_host
|
|
|
|
+#osshost=$bucket.$host
|
|
# 校验method
|
|
# 校验method
|
|
if test -z "$method"
|
|
if test -z "$method"
|
|
then
|
|
then
|
|
@@ -79,4 +78,4 @@ else
|
|
-H "Content-Type: ${contentType}" \
|
|
-H "Content-Type: ${contentType}" \
|
|
-H "Authorization: OSS ${Id}:${signature}" \
|
|
-H "Authorization: OSS ${Id}:${signature}" \
|
|
${url} -o ${dest}
|
|
${url} -o ${dest}
|
|
-fi
|
|
|
|
|
|
+fi
|