up.
This commit is contained in:
parent
f674435b25
commit
b16f9a0a24
@ -125,7 +125,17 @@ class FilesystemService
|
|||||||
'delete_time' => null,
|
'delete_time' => null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
// 是否需要安全访问
|
||||||
|
if ($rule->permissions) {
|
||||||
|
$fileId = hashids(12)->encode($sysFileRecord->id);
|
||||||
|
$uploadPath = "i/" . $fileId;
|
||||||
|
$fileUrl = $putUrl . '/' . ltrim($uploadPath, '/');
|
||||||
|
}
|
||||||
|
|
||||||
(new SysUserFile)->save([
|
(new SysUserFile)->save([
|
||||||
|
'rule_id' => $rule_id,
|
||||||
|
'disk' => $putDisk,
|
||||||
'user_id' => $user_id,
|
'user_id' => $user_id,
|
||||||
'name' => $file->getOriginalName(),
|
'name' => $file->getOriginalName(),
|
||||||
'is_directory' => 0,
|
'is_directory' => 0,
|
||||||
@ -134,19 +144,9 @@ class FilesystemService
|
|||||||
'length' => $file->getSize(),
|
'length' => $file->getSize(),
|
||||||
'content_type' => $file->getOriginalMime(),
|
'content_type' => $file->getOriginalMime(),
|
||||||
'deleted' => 0,
|
'deleted' => 0,
|
||||||
// 磁盘
|
|
||||||
'disk' => $putDisk,
|
|
||||||
// 存储规则
|
|
||||||
'rule_id' => $rule_id,
|
|
||||||
'url' => $fileUrl,
|
'url' => $fileUrl,
|
||||||
'is_anonymous' => 0,
|
'is_anonymous' => 0,
|
||||||
]);
|
]);
|
||||||
// 是否需要安全访问
|
|
||||||
if ($rule->permissions) {
|
|
||||||
$fileId = hashids(12)->encode($sysFileRecord->id);
|
|
||||||
$uploadPath = "i/" . $fileId;
|
|
||||||
$fileUrl = $putUrl . '/' . ltrim($uploadPath, '/');
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 上传结果封装
|
* 上传结果封装
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user