作者 yangfu

fix: internal file url

@@ -31,6 +31,9 @@ func ConvertFileUrlToInternal(fileUrl string) string { @@ -31,6 +31,9 @@ func ConvertFileUrlToInternal(fileUrl string) string {
31 } 31 }
32 var bucketRegion = "https://byte-bank.oss-cn-hangzhou" 32 var bucketRegion = "https://byte-bank.oss-cn-hangzhou"
33 var bucketInternalRegion = "https://byte-bank.oss-cn-hangzhou-internal" 33 var bucketInternalRegion = "https://byte-bank.oss-cn-hangzhou-internal"
  34 + if strings.HasPrefix(fileUrl, bucketInternalRegion) {
  35 + return fileUrl
  36 + }
34 if strings.HasPrefix(fileUrl, bucketRegion) { 37 if strings.HasPrefix(fileUrl, bucketRegion) {
35 return strings.Replace(fileUrl, bucketRegion, bucketInternalRegion, 1) 38 return strings.Replace(fileUrl, bucketRegion, bucketInternalRegion, 1)
36 } 39 }