切换导航条
此项目
正在载入...
登录
景龙
/
feipin
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
景龙
6 years ago
提交
da0b8f1414e49ac1fbb6130aed40ad77d5e4297c
1 个父辈
2303eab2
master
1 个管道 的构建
通过
耗费 0 秒
修改富文本编辑器图片的域名
变更
1
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
application/admin/controller/Ajax.php
application/admin/controller/Ajax.php
查看文件 @
da0b8f1
...
...
@@ -105,6 +105,7 @@ class Ajax extends Backend
$imagewidth
=
isset
(
$imgInfo
[
0
])
?
$imgInfo
[
0
]
:
$imagewidth
;
$imageheight
=
isset
(
$imgInfo
[
1
])
?
$imgInfo
[
1
]
:
$imageheight
;
}
$url
=
'http://feipin.w.brotop.cn'
.
$uploadDir
.
$splInfo
->
getSaveName
();
$params
=
array
(
'admin_id'
=>
(
int
)
$this
->
auth
->
id
,
'user_id'
=>
0
,
...
...
@@ -114,7 +115,7 @@ class Ajax extends Backend
'imagetype'
=>
$suffix
,
'imageframes'
=>
0
,
'mimetype'
=>
$fileInfo
[
'type'
],
'url'
=>
$u
ploadDir
.
$splInfo
->
getSaveName
()
,
'url'
=>
$u
rl
,
'uploadtime'
=>
time
(),
'storage'
=>
'local'
,
'sha1'
=>
$sha1
,
...
...
@@ -124,7 +125,7 @@ class Ajax extends Backend
$attachment
->
save
();
\think\Hook
::
listen
(
"upload_after"
,
$attachment
);
$this
->
success
(
__
(
'Upload successful'
),
null
,
[
'url'
=>
$u
ploadDir
.
$splInfo
->
getSaveName
()
'url'
=>
$u
rl
]);
}
else
{
// 上传失败获取错误信息
...
...
请
注册
或
登录
后发表评论