图片上传

This commit is contained in:
18631081161 2026-01-20 22:33:51 +08:00
parent 1a2edfb356
commit b7b399ba66
2 changed files with 8 additions and 2 deletions

View File

@ -21,7 +21,7 @@ const ENV = {
}
// 当前环境 - 开发时使用 development打包时改为 production
const CURRENT_ENV = 'development'
const CURRENT_ENV = 'production'
// 导出配置
export const config = {

View File

@ -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