Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
数据应用
ThinkLibrary
提交
9f540829
T
ThinkLibrary
项目概览
数据应用
/
ThinkLibrary
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
代码片段
项目成员
Pages
T
ThinkLibrary
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
9f540829
编写于
6月 07, 2020
作者:
李光春
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- 抖音支持上传到云存储
上级
4156f8a0
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
6 addition
and
4 deletion
+6
-4
src/service/aliyun/OssService.php
src/service/aliyun/OssService.php
+1
-1
src/service/baidu/BosService.php
src/service/baidu/BosService.php
+1
-1
src/service/douyin/WatermarkService.php
src/service/douyin/WatermarkService.php
+2
-0
src/service/huaweicloud/ObsService.php
src/service/huaweicloud/ObsService.php
+1
-1
src/service/tencent/CosService.php
src/service/tencent/CosService.php
+1
-1
未找到文件。
src/service/aliyun/OssService.php
浏览文件 @
9f540829
...
...
@@ -84,7 +84,7 @@ class OssService extends Service
try
{
$ossClient
=
new
OssClient
(
$this
->
accessKeyId
,
$this
->
accessKeySecret
,
$this
->
endpoint
);
$ossClient
->
uploadFile
(
$this
->
bucket
,
$object
,
$filePath
);
return
$this
->
app
->
config
->
get
(
'dtapp.aliyun.oss.url'
)
.
$
filePath
;
return
$this
->
app
->
config
->
get
(
'dtapp.aliyun.oss.url'
)
.
$
object
;
}
catch
(
OssException
$e
)
{
return
$e
->
getMessage
();
}
...
...
src/service/baidu/BosService.php
浏览文件 @
9f540829
...
...
@@ -93,6 +93,6 @@ class BosService extends Service
// 从文件中直接上传Object
if
(
empty
(
$this
->
bucket
))
$this
->
getConfig
();
$client
->
putObjectFromFile
(
$this
->
bucket
,
$object
,
$filePath
);
return
$this
->
app
->
config
->
get
(
'dtapp.baidu.bos.url'
)
.
$
filePath
;
return
$this
->
app
->
config
->
get
(
'dtapp.baidu.bos.url'
)
.
$
object
;
}
}
src/service/douyin/WatermarkService.php
浏览文件 @
9f540829
...
...
@@ -24,6 +24,7 @@ use DtApp\ThinkLibrary\service\baidu\BosService;
use
DtApp\ThinkLibrary\service\huaweicloud\ObsService
;
use
DtApp\ThinkLibrary\service\StorageService
;
use
DtApp\ThinkLibrary\service\tencent\CosService
;
use
Exception
;
use
stdClass
;
/**
...
...
@@ -192,6 +193,7 @@ class WatermarkService extends Service
/**
* 获取全部信息
* @return $this
* @throws Exception
*/
public
function
getAll
()
{
...
...
src/service/huaweicloud/ObsService.php
浏览文件 @
9f540829
...
...
@@ -92,7 +92,7 @@ class ObsService extends Service
'SourceFile'
=>
$filePath
// localfile为待上传的本地文件路径,需要指定到具体的文件名
]);
if
(
isset
(
$resp
[
'RequestId'
]))
{
return
$this
->
app
->
config
->
get
(
'dtapp.huaweicloud.obs.url'
)
.
$
filePath
;
return
$this
->
app
->
config
->
get
(
'dtapp.huaweicloud.obs.url'
)
.
$
object
;
}
else
{
return
false
;
}
...
...
src/service/tencent/CosService.php
浏览文件 @
9f540829
...
...
@@ -102,6 +102,6 @@ class CosService extends Service
'Body'
=>
$file
)
);
}
return
$this
->
app
->
config
->
get
(
'dtapp.tencent.cos.url'
)
.
$
filePath
;
return
$this
->
app
->
config
->
get
(
'dtapp.tencent.cos.url'
)
.
$
object
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录