mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]修复文件上传引擎选用问题
This commit is contained in:
parent
6e2c976bb7
commit
52ce17a0b7
@ -47,7 +47,11 @@ class Plugs extends BasicAdmin {
|
|||||||
$types = $this->request->get('type', 'jpg,png');
|
$types = $this->request->get('type', 'jpg,png');
|
||||||
$this->assign('mode', $mode);
|
$this->assign('mode', $mode);
|
||||||
$this->assign('types', $types);
|
$this->assign('types', $types);
|
||||||
$this->assign('uptype', $this->request->get('uptype', sysconf('storage_type')));
|
$uptype = $this->request->get('uptype');
|
||||||
|
if (!in_array($uptype, ['local', 'qiniu'])) {
|
||||||
|
$uptype = sysconf('storage_type');
|
||||||
|
}
|
||||||
|
$this->assign('uptype', $uptype);
|
||||||
$this->assign('mimes', FileService::getFileMine($types));
|
$this->assign('mimes', FileService::getFileMine($types));
|
||||||
$this->assign('field', $this->request->get('field', 'file'));
|
$this->assign('field', $this->request->get('field', 'file'));
|
||||||
return view();
|
return view();
|
||||||
|
@ -101,7 +101,7 @@ define(['jquery', 'admin.plugs'], function () {
|
|||||||
var field = $(this).attr('data-field') || 'file';
|
var field = $(this).attr('data-field') || 'file';
|
||||||
var method = $(this).attr('data-file') === 'one' ? 'one' : 'mtl';
|
var method = $(this).attr('data-file') === 'one' ? 'one' : 'mtl';
|
||||||
var title = $(this).attr('data-title') || '文件上传';
|
var title = $(this).attr('data-title') || '文件上传';
|
||||||
var uptype = $(this).attr('data-uptype') || 'local';
|
var uptype = $(this).attr('data-uptype') || '';
|
||||||
var url = window.ROOT_URL + '/index.php/admin/plugs/upfile/mode/' + method + '.html?uptype=' + uptype + '&type=' + type + '&field=' + field;
|
var url = window.ROOT_URL + '/index.php/admin/plugs/upfile/mode/' + method + '.html?uptype=' + uptype + '&type=' + type + '&field=' + field;
|
||||||
$.form.iframe(url, title || '文件管理');
|
$.form.iframe(url, title || '文件管理');
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user