Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
aerphouse
ApolloERP
提交
5f8033a9
ApolloERP
项目概览
aerphouse
/
ApolloERP
大约 1 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ApolloERP
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
5f8033a9
编写于
4月 11, 2024
作者:
I
IanDavid
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
上传
上级
b760ea37
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
50 addition
and
9 deletion
+50
-9
Ae.FileUpload.Api/Ae.FileUpload.Api.Imp/Services/QiNiuService.cs
...Upload.Api/Ae.FileUpload.Api.Imp/Services/QiNiuService.cs
+22
-8
Ae.FileUpload.Api/Ae.FileUpload.Api/appsettings.Development.json
...Upload.Api/Ae.FileUpload.Api/appsettings.Development.json
+9
-0
Ae.FileUpload.Api/Ae.FileUpload.Api/appsettings.Staging.json
Ae.FileUpload.Api/Ae.FileUpload.Api/appsettings.Staging.json
+9
-0
Ae.FileUpload.Api/Ae.FileUpload.Api/appsettings.json
Ae.FileUpload.Api/Ae.FileUpload.Api/appsettings.json
+9
-0
Ae.Shop.Service/Ae.Shop.Service.Imp/Services/ShopService.cs
Ae.Shop.Service/Ae.Shop.Service.Imp/Services/ShopService.cs
+1
-1
未找到文件。
Ae.FileUpload.Api/Ae.FileUpload.Api.Imp/Services/QiNiuService.cs
浏览文件 @
5f8033a9
...
...
@@ -14,29 +14,43 @@ using System.IO;
using
System.Net.Http
;
using
System.Text
;
using
System.Threading.Tasks
;
using
Microsoft.Extensions.Configuration
;
namespace
Ae.FileUpload.Api.Imp.Services
{
public
class
QiNiuService
:
IQiNiuService
{
private
const
string
AccessKey
=
"_Igfnj2QmaHxXs****"
;
//管理文件 认证
private
const
string
SecretKey
=
"D9fhN79BqJwVsp****"
;
//管理文件 认证
// private const string Domain = "https://m.aerp.com.cn";//文件管理 外链默认域名
private
readonly
IConfiguration
_configuration
;
private
string
AccessKey
=
"_Igfnj2QmaHxXs****"
;
//管理文件 认证
private
string
SecretKey
=
"D9fhN79BqJwVsp****"
;
//管理文件 认证
// private string Domain = "https://m.aerp.com.cn";//文件管理 外链默认域名
private
string
ImageDomain
=
"http://image.aerp.com.cn"
;
private
string
VideoDomain
=
"http://video.aerp.com.cn"
;
private
bool
useHttps
=
false
;
private
string
ImageBucket
=
"aerp"
;
//空间名,可以是公开或者私有的
private
string
VideoBucket
=
"video"
;
public
QiNiuService
()
public
QiNiuService
(
IConfiguration
configuration
)
{
_configuration
=
configuration
;
AccessKey
=
_configuration
[
"Qiniu:AccessKey"
];
//管理文件 认证
SecretKey
=
_configuration
[
"Qiniu:SecretKey"
];
ImageDomain
=
_configuration
[
"Qiniu:ImageDomain"
];
//文件管理 外链默认域名
VideoDomain
=
_configuration
[
"Qiniu:VideoDomain"
];
ImageBucket
=
_configuration
[
"Qiniu:ImageBucket"
];
//空间名,可以是公开或者私有的
VideoBucket
=
_configuration
[
"Qiniu:VideoBucket"
];
useHttps
=
_configuration
[
"Qiniu:UseHttps"
]==
"true"
;
//是否使用HTTPS
// AK = ACCESS_KEY
// USE_HTTPS = (true|false) 是否使用HTTPS
// 使用前请确保AK和BUCKET正确,否则此函数会抛出异常(比如code612/631等错误)
Qiniu
.
Common
.
Config
.
AutoZone
(
AccessKey
,
ImageBucket
,
true
);
Qiniu
.
Common
.
Config
.
AutoZone
(
AccessKey
,
VideoBucket
,
true
);
Qiniu
.
Common
.
Config
.
AutoZone
(
AccessKey
,
ImageBucket
,
useHttps
);
Qiniu
.
Common
.
Config
.
AutoZone
(
AccessKey
,
VideoBucket
,
useHttps
);
}
//public Tuple<string, string> GetBucketAndHostByFileName(string fileName)
...
...
Ae.FileUpload.Api/Ae.FileUpload.Api/appsettings.Development.json
浏览文件 @
5f8033a9
...
...
@@ -8,6 +8,15 @@
"ApolloErpSql"
:
""
,
"ApolloErpSqlReadOnly"
:
""
,
"ToSwAlarmEamil"
:
"devMonitor@ApolloErp.cn"
,
"Qiniu"
:
{
"AccessKey"
:
"-ZTwoPQR"
,
"SecretKey"
:
"H75QaMXbnOnT1-"
,
"ImageDomain"
:
"http://image.aerp.com.cn"
,
"VideoDomain"
:
"http://video.aerp.com.cn"
,
"UseHttps"
:
"false"
,
"ImageBucket"
:
"aerp"
,
"VideoBucket"
:
"video"
},
"ShopServer"
:
{
"Domain"
:
"http://192.168.3.252:8002/"
,
"GetShopInfo"
:
"Demo/GetShopInfo"
,
...
...
Ae.FileUpload.Api/Ae.FileUpload.Api/appsettings.Staging.json
浏览文件 @
5f8033a9
...
...
@@ -7,6 +7,15 @@
"AllowedHosts"
:
"*"
,
"EnableSwagger"
:
"false"
,
"ToSwAlarmEamil"
:
"devMonitor@ApolloErp.cn"
,
"Qiniu"
:
{
"AccessKey"
:
""
,
"SecretKey"
:
""
,
"ImageDomain"
:
"https://m.aerp.com.cn"
,
"VideoDomain"
:
"https://video.aerp.com.cn"
,
"UseHttps"
:
"true"
,
"ImageBucket"
:
"aerp"
,
"VideoBucket"
:
"video"
},
"SkyWalking"
:
{
"ServiceName"
:
"Ae.FileUpload.Api"
,
"Namespace"
:
""
,
...
...
Ae.FileUpload.Api/Ae.FileUpload.Api/appsettings.json
浏览文件 @
5f8033a9
...
...
@@ -7,6 +7,15 @@
"AllowedHosts"
:
"*"
,
"EnableSwagger"
:
"true"
,
"ToSwAlarmEamil"
:
"devMonitor@ApolloErp.cn"
,
"Qiniu"
:
{
"AccessKey"
:
""
,
"SecretKey"
:
""
,
"ImageDomain"
:
"https://m.aerp.com.cn"
,
"VideoDomain"
:
"https://video.aerp.com.cn"
,
"UseHttps"
:
"true"
,
"ImageBucket"
:
"aerp"
,
"VideoBucket"
:
"video"
},
"SkyWalking"
:
{
"ServiceName"
:
"Ae.FileUpload.Api"
,
"Namespace"
:
""
,
...
...
Ae.Shop.Service/Ae.Shop.Service.Imp/Services/ShopService.cs
浏览文件 @
5f8033a9
...
...
@@ -578,7 +578,7 @@ namespace Ae.Shop.Service.Imp.Services
+
DateTime
.
Now
.
Second
.
ToString
()
+
DateTime
.
Now
.
Millisecond
.
ToString
()
+
".png"
;
fullName
=
"Shops/"
+
fileName
;
fullName
=
"Shops/
QRCode/
"
+
fileName
;
await
_fileUploadClient
.
UploadBytes
(
new
UploadByteRequest
{
Bytes
=
result
.
CodeBytes
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录