mirror of
https://github.com/lsky-org/lsky-pro.git
synced 2025-01-08 11:57:52 +08:00
⬆️ Upgrading dependencies.
This commit is contained in:
parent
53c62f6e9b
commit
4b7d34fc4f
3
.env.example
Normal file
3
.env.example
Normal file
@ -0,0 +1,3 @@
|
||||
[app]
|
||||
debug = false
|
||||
trace = false
|
@ -209,29 +209,20 @@ class Upload extends Base
|
||||
$naming = Config::pull('naming');
|
||||
$pathRule = $this->config['path_naming_rule'];
|
||||
$fileRule = $this->config['file_naming_rule'];
|
||||
|
||||
if ($pathRule === '{input}') {
|
||||
$path = trim(input('album'), '/');
|
||||
} elseif ($pathRule === '{input_with_user}') {
|
||||
$path = trim($this->user->username . '/' . input('album'), '/');
|
||||
} else {
|
||||
$path = trim(str_replace(
|
||||
array_column($naming['path'], 'name'),
|
||||
array_column($naming['path'], 'value'),
|
||||
$pathRule
|
||||
), '/');
|
||||
}
|
||||
|
||||
$path = trim(str_replace(
|
||||
array_column($naming['path'], 'name'),
|
||||
array_column($naming['path'], 'value'),
|
||||
$pathRule
|
||||
), '/');
|
||||
if ($fileRule === '{original}') {
|
||||
$file = $name;
|
||||
} else {
|
||||
$file = trim(str_replace(
|
||||
array_column($naming['file'], 'name'),
|
||||
array_column($naming['file'], 'value'),
|
||||
$fileRule
|
||||
), '/') . '.' . get_file_ext($name);
|
||||
array_column($naming['file'], 'name'),
|
||||
array_column($naming['file'], 'value'),
|
||||
$fileRule
|
||||
), '/') . '.' . get_file_ext($name);
|
||||
}
|
||||
|
||||
return $path . '/' . $file;
|
||||
}
|
||||
}
|
||||
|
@ -24,8 +24,6 @@
|
||||
</div>
|
||||
<form action="" method="post" enctype="multipart/form-data">
|
||||
<input id="image" style="display: none;" type="file" multiple name="image" accept="image/*">
|
||||
<br>
|
||||
<input id="album" class="input-group form-control" type="text" name="album" placeholder="上传到相册,{input} 模式不可留空,{input_with_user} 模式可留空" tabindex="500">
|
||||
</form>
|
||||
<div class="success-info">
|
||||
<div class="mdui-tab mdui-tab-scrollable" mdui-tab>
|
||||
@ -102,12 +100,6 @@
|
||||
//browseClass: "btn btn-file",
|
||||
maxFileSize: "{$config.upload_max_size / 1024}",// kb
|
||||
maxFileCount: "{$config.upload_single_num}",
|
||||
uploadExtraData: function(previewId, index) {
|
||||
var data = {
|
||||
album : $('#album').val(),
|
||||
};
|
||||
return data;
|
||||
},
|
||||
showCaption: true,
|
||||
dropZoneEnabled: true,
|
||||
browseIcon: "<i class=\"glyphicon glyphicon-picture\"></i> ",
|
||||
|
@ -87,18 +87,6 @@ return [
|
||||
'explain' => '16位随机字符串',
|
||||
'value' => str_rand(),
|
||||
],
|
||||
[
|
||||
'name' => '{input}',
|
||||
'example' => 'life、宠物',
|
||||
'explain' => '上传到相册名字,上传时由用户输入指定,比如上传时输入 life,则会上传到 path-store/life/文件夹下',
|
||||
'value' => $md5,
|
||||
],
|
||||
[
|
||||
'name' => '{input_with_user}',
|
||||
'example' => 'life、宠物',
|
||||
'explain' => '上传到相册名字,上传时由用户输入指定,路径带有当前用户名前缀,比如上传时输入 life,则会上传到: path-store/username/life/文件夹下',
|
||||
'value' => $md5,
|
||||
],
|
||||
],
|
||||
'file' => [
|
||||
[
|
||||
|
@ -7,6 +7,6 @@
|
||||
*/
|
||||
|
||||
return [
|
||||
// 色情图片是否直接拦截
|
||||
// 违规图片是否直接拦截
|
||||
'intercept_salacity' => false,
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user