mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-05 05:50:19 +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 := ""
|
fileUrl := ""
|
||||||
if host != "" {
|
if host != "" {
|
||||||
fileUrl = util.UrlJoin(host, escapePath(objectKey))
|
// fileUrl = util.UrlJoin(host, escapePath(objectKey))
|
||||||
|
fileUrl = util.UrlJoin(host, objectKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
if fileUrl != "" && hasTimestamp {
|
// if fileUrl != "" && hasTimestamp {
|
||||||
fileUrl = fmt.Sprintf("%s?t=%s", fileUrl, util.GetCurrentUnixTime())
|
// fileUrl = fmt.Sprintf("%s?t=%s", fileUrl, util.GetCurrentUnixTime())
|
||||||
}
|
// }
|
||||||
|
|
||||||
if provider.Type == ProviderTypeTencentCloudCOS {
|
if provider.Type == ProviderTypeTencentCloudCOS {
|
||||||
objectKey = escapePath(objectKey)
|
objectKey = escapePath(objectKey)
|
||||||
|
Reference in New Issue
Block a user