Skip to content

Commit

Permalink
fix https
Browse files Browse the repository at this point in the history
  • Loading branch information
myussufz committed Apr 21, 2019
1 parent e27c66f commit cf2c4e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions aliyun_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ func getAliyunFileURL(endpoint, bucket string, filename string) string {
}

func (adapter *AliyunAdapter) getFilePathFromURL(bucket, fileURL string) string {
endpoint := regexp.MustCompile(`^(http|https)://`).ReplaceAllString(fileURL, "")
return strings.Replace(fileURL, fmt.Sprintf("%s.%s/", bucket, endpoint), "", -1)
endpoint := regexp.MustCompile(`^(http|https)://`).ReplaceAllString(adapter.Endpoint, "")
f := regexp.MustCompile(`^(http|https)://`).ReplaceAllString(fileURL, "")
return strings.Replace(f, fmt.Sprintf("%s.%s/", bucket, endpoint), "", -1)
}

0 comments on commit cf2c4e0

Please sign in to comment.