Skip to content

Commit

Permalink
fix http and https
Browse files Browse the repository at this point in the history
  • Loading branch information
myussufz committed Apr 21, 2019
1 parent 93f5efa commit e27c66f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aliyun_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ func (adapter *AliyunAdapter) getClient() (*oss.Client, error) {
}

func getAliyunFileURL(endpoint, bucket string, filename string) string {
return fmt.Sprintf("%s.%s/%s", bucket, endpoint, filename)
endpoint = regexp.MustCompile(`^(http|https)://`).ReplaceAllString(endpoint, "")
return fmt.Sprintf("https://%s.%s/%s", bucket, endpoint, filename)
}

func (adapter *AliyunAdapter) getFilePathFromURL(bucket, fileURL string) string {
Expand Down

0 comments on commit e27c66f

Please sign in to comment.