图片上传
This commit is contained in:
parent
1a2edfb356
commit
b7b399ba66
|
|
@ -21,7 +21,7 @@ const ENV = {
|
|||
}
|
||||
|
||||
// 当前环境 - 开发时使用 development,打包时改为 production
|
||||
const CURRENT_ENV = 'development'
|
||||
const CURRENT_ENV = 'production'
|
||||
|
||||
// 导出配置
|
||||
export const config = {
|
||||
|
|
|
|||
|
|
@ -156,7 +156,13 @@ public class TencentCosProvider : IStorageProvider
|
|||
// 如果配置了CDN域名,使用CDN域名
|
||||
if (!string.IsNullOrEmpty(_options.CdnDomain))
|
||||
{
|
||||
return $"https://{_options.CdnDomain}/{fileKey}";
|
||||
// 如果CdnDomain已经包含协议,直接使用;否则添加https://
|
||||
var domain = _options.CdnDomain;
|
||||
if (domain.StartsWith("http://") || domain.StartsWith("https://"))
|
||||
{
|
||||
return $"{domain}/{fileKey}";
|
||||
}
|
||||
return $"https://{domain}/{fileKey}";
|
||||
}
|
||||
|
||||
// 生成预签名URL
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user