mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-02 11:20:18 +08:00
feat: improve uploaded file URL
This commit is contained in:
@ -100,12 +100,13 @@ func GetUploadFileUrl(provider *Provider, fullFilePath string, hasTimestamp bool
|
||||
|
||||
fileUrl := ""
|
||||
if host != "" {
|
||||
fileUrl = util.UrlJoin(host, escapePath(objectKey))
|
||||
// fileUrl = util.UrlJoin(host, escapePath(objectKey))
|
||||
fileUrl = util.UrlJoin(host, objectKey)
|
||||
}
|
||||
|
||||
if fileUrl != "" && hasTimestamp {
|
||||
fileUrl = fmt.Sprintf("%s?t=%s", fileUrl, util.GetCurrentUnixTime())
|
||||
}
|
||||
// if fileUrl != "" && hasTimestamp {
|
||||
// fileUrl = fmt.Sprintf("%s?t=%s", fileUrl, util.GetCurrentUnixTime())
|
||||
// }
|
||||
|
||||
if provider.Type == ProviderTypeTencentCloudCOS {
|
||||
objectKey = escapePath(objectKey)
|
||||
|
Reference in New Issue
Block a user