diff --git a/CoreCms.Net.Configuration/SystemSettingDictionary.cs b/CoreCms.Net.Configuration/SystemSettingDictionary.cs index 72b9280..c925976 100644 --- a/CoreCms.Net.Configuration/SystemSettingDictionary.cs +++ b/CoreCms.Net.Configuration/SystemSettingDictionary.cs @@ -175,7 +175,7 @@ namespace CoreCms.Net.Configuration //附件存储 di.Add(SystemSettingConstVars.FilesStorageType, new DictionaryKeyValues() { sKey = "存储方式", sValue = "LocalStorage" }); - di.Add(SystemSettingConstVars.FilesStoragePath, new DictionaryKeyValues() { sKey = "存储路径", sValue = "Upload" }); + di.Add(SystemSettingConstVars.FilesStoragePath, new DictionaryKeyValues() { sKey = "存储路径", sValue = "/upload/" }); di.Add(SystemSettingConstVars.FilesStorageFileSuffix, new DictionaryKeyValues() { sKey = "文件后缀类型", sValue = "gif,jpg,jpeg,png,bmp,xls,xlsx,doc,pdf,mp4,WebM,Ogv" }); di.Add(SystemSettingConstVars.FilesStorageFileMaxSize, new DictionaryKeyValues() { sKey = "文件最大大小", sValue = "10" }); di.Add(SystemSettingConstVars.FilesStorageBucketBindUrl, new DictionaryKeyValues() { sKey = "云存储绑定域名", sValue = "https://www.corecms.net/" }); diff --git a/CoreCms.Net.Web.Admin/Controllers/Com/ToolsController.cs b/CoreCms.Net.Web.Admin/Controllers/Com/ToolsController.cs index b89916d..80e7e62 100644 --- a/CoreCms.Net.Web.Admin/Controllers/Com/ToolsController.cs +++ b/CoreCms.Net.Web.Admin/Controllers/Com/ToolsController.cs @@ -424,7 +424,7 @@ namespace CoreCms.Net.Web.Admin.Controllers var md5 = OssUtils.ComputeContentMd5(fileStream, file.Length); var filePath = _filesStorageOptions.Path + today + "/" + newFileName; //云文件保存路径 - //初始化阿里云配置--外网Endpoint、访问ID、访问password + //初始化阿里云配置--外网Endpoint、访问ID、访问password var aliyun = new OssClient(_filesStorageOptions.Endpoint, _filesStorageOptions.AccessKeyId, _filesStorageOptions.AccessKeySecret); //将文件md5值赋值给meat头信息,服务器验证文件MD5 var objectMeta = new ObjectMetadata @@ -522,7 +522,7 @@ namespace CoreCms.Net.Web.Admin.Controllers if (_filesStorageOptions.StorageType == GlobalEnumVars.FilesStorageOptionsType.LocalStorage.ToString()) { - var saveUrl = "/Upload/" + today + "/"; + var saveUrl = _filesStorageOptions.Path + today + "/"; var dirPath = _webHostEnvironment.WebRootPath + saveUrl; string bucketBindDomain = AppSettingsConstVars.AppConfigAppUrl; @@ -554,7 +554,7 @@ namespace CoreCms.Net.Web.Admin.Controllers var md5 = OssUtils.ComputeContentMd5(fileStream, memStream.Length); var filePath = _filesStorageOptions.Path + today + "/" + newFileName; //云文件保存路径 - //初始化阿里云配置--外网Endpoint、访问ID、访问password + //初始化阿里云配置--外网Endpoint、访问ID、访问password var aliyun = new OssClient(_filesStorageOptions.Endpoint, _filesStorageOptions.AccessKeyId, _filesStorageOptions.AccessKeySecret); //将文件md5值赋值给meat头信息,服务器验证文件MD5 var objectMeta = new ObjectMetadata @@ -608,6 +608,7 @@ namespace CoreCms.Net.Web.Admin.Controllers src = _filesStorageOptions.BucketBindUrl + filePath }; } + jm.otherData = _filesStorageOptions; return Json(jm); @@ -688,7 +689,7 @@ namespace CoreCms.Net.Web.Admin.Controllers var md5 = OssUtils.ComputeContentMd5(fileStream, file.Length); var filePath = _filesStorageOptions.Path + today + "/" + newFileName; //云文件保存路径 - //初始化阿里云配置--外网Endpoint、访问ID、访问password + //初始化阿里云配置--外网Endpoint、访问ID、访问password var aliyun = new OssClient(_filesStorageOptions.Endpoint, _filesStorageOptions.AccessKeyId, _filesStorageOptions.AccessKeySecret); //将文件md5值赋值给meat头信息,服务器验证文件MD5 var objectMeta = new ObjectMetadata diff --git a/CoreCms.Net.Web.Admin/wwwroot/Upload/20210720/20210720195511_9525.jpg b/CoreCms.Net.Web.Admin/wwwroot/Upload/20210720/20210720195511_9525.jpg deleted file mode 100644 index 40bf538..0000000 Binary files a/CoreCms.Net.Web.Admin/wwwroot/Upload/20210720/20210720195511_9525.jpg and /dev/null differ diff --git a/CoreCms.Net.Web.Admin/wwwroot/Upload/20210720/20210720195535_5311.jpg b/CoreCms.Net.Web.Admin/wwwroot/Upload/20210720/20210720195535_5311.jpg deleted file mode 100644 index 31e3ffe..0000000 Binary files a/CoreCms.Net.Web.Admin/wwwroot/Upload/20210720/20210720195535_5311.jpg and /dev/null differ diff --git a/CoreCms.Net.Web.Admin/wwwroot/Upload/20210720/20210720211728_7973.jpg b/CoreCms.Net.Web.Admin/wwwroot/Upload/20210720/20210720211728_7973.jpg deleted file mode 100644 index 40bf538..0000000 Binary files a/CoreCms.Net.Web.Admin/wwwroot/Upload/20210720/20210720211728_7973.jpg and /dev/null differ diff --git a/CoreCms.Net.Web.Admin/wwwroot/Upload/20210720/20210720211739_2562.jpg b/CoreCms.Net.Web.Admin/wwwroot/Upload/20210720/20210720211739_2562.jpg deleted file mode 100644 index edbacac..0000000 Binary files a/CoreCms.Net.Web.Admin/wwwroot/Upload/20210720/20210720211739_2562.jpg and /dev/null differ diff --git a/CoreCms.Net.Web.Admin/wwwroot/Upload/20210720/20210720211826_3596.jpg b/CoreCms.Net.Web.Admin/wwwroot/Upload/20210720/20210720211826_3596.jpg deleted file mode 100644 index 596944e..0000000 Binary files a/CoreCms.Net.Web.Admin/wwwroot/Upload/20210720/20210720211826_3596.jpg and /dev/null differ diff --git a/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html b/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html index 27863ce..90dbc9d 100644 --- a/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html +++ b/CoreCms.Net.Web.Admin/wwwroot/views/shop/setting/index.html @@ -538,7 +538,7 @@