no message
This commit is contained in:
@@ -509,7 +509,7 @@ class FileController extends AbstractController
|
||||
}
|
||||
//
|
||||
if ($file->isNnShare()) {
|
||||
return Base::retError('已经处于共享目录中');
|
||||
return Base::retError('已经处于共享文件夹中');
|
||||
}
|
||||
//
|
||||
if ($action == 'unshare') {
|
||||
|
||||
+5
-5
@@ -51,21 +51,21 @@ class File extends AbstractModel
|
||||
|
||||
/**
|
||||
* 是否有访问权限
|
||||
* ① 自己的目录
|
||||
* ② 共享所有人的目录
|
||||
* ① 自己的文件夹
|
||||
* ② 共享所有人的文件夹
|
||||
* ③ 在指定共享人员内
|
||||
* @param $userid
|
||||
*/
|
||||
public function chackAllow($userid)
|
||||
{
|
||||
if ($userid == $this->userid) {
|
||||
// ① 自己的目录
|
||||
// ① 自己的文件夹
|
||||
return;
|
||||
}
|
||||
$row = $this->getShareInfo();
|
||||
if ($row) {
|
||||
if ($row->share == 1) {
|
||||
// ② 共享所有人的目录
|
||||
// ② 共享所有人的文件夹
|
||||
return;
|
||||
} elseif ($row->share == 2) {
|
||||
// ③ 在指定共享人员内
|
||||
@@ -101,7 +101,7 @@ class File extends AbstractModel
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否处于共享目录内(不含自身)
|
||||
* 是否处于共享文件夹内(不含自身)
|
||||
* @return bool
|
||||
*/
|
||||
public function isNnShare()
|
||||
|
||||
+6
-6
@@ -249,7 +249,7 @@ class Base
|
||||
}
|
||||
|
||||
/**
|
||||
* 新建目录
|
||||
* 新建文件夹
|
||||
* @param $path
|
||||
* @return mixed
|
||||
*/
|
||||
@@ -268,7 +268,7 @@ class Base
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除目录
|
||||
* 删除文件夹
|
||||
* @param $path
|
||||
*/
|
||||
public static function deleteDir($path)
|
||||
@@ -277,9 +277,9 @@ class Base
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除目录及目录下所有的文件
|
||||
* 删除文件夹及文件夹下所有的文件
|
||||
* @param $dirName
|
||||
* @param bool $undeleteDir 不删除目录(只删除文件)
|
||||
* @param bool $undeleteDir 不删除文件夹(只删除文件)
|
||||
*/
|
||||
public static function deleteDirAndFile($dirName, $undeleteDir = false)
|
||||
{
|
||||
@@ -2129,7 +2129,7 @@ class Base
|
||||
$array = [
|
||||
"name" => $fileName, //原文件名
|
||||
"size" => Base::twoFloat($fileSize / 1024, true), //大小KB
|
||||
"file" => $filePath . $fileName, //目录的完整路径 "D:\www....KzZ.jpg"
|
||||
"file" => $filePath . $fileName, //文件的完整路径 "D:\www....KzZ.jpg"
|
||||
"path" => $fileDir . $fileName, //相对路径 "uploads/pic....KzZ.jpg"
|
||||
"url" => Base::fillUrl($fileDir . $fileName), //完整的URL "https://.....hhsKzZ.jpg"
|
||||
"thumb" => '', //缩略图(预览图) "https://.....hhsKzZ.jpg_thumb.jpg"
|
||||
@@ -2278,7 +2278,7 @@ class Base
|
||||
$array = [
|
||||
"name" => $file->getClientOriginalName(), //原文件名
|
||||
"size" => Base::twoFloat($fileSize / 1024, true), //大小KB
|
||||
"file" => public_path($param['path'] . $fileName), //目录的完整路径 "D:\www....KzZ.jpg"
|
||||
"file" => public_path($param['path'] . $fileName), //文件的完整路径 "D:\www....KzZ.jpg"
|
||||
"path" => $param['path'] . $fileName, //相对路径 "uploads/pic....KzZ.jpg"
|
||||
"url" => Base::fillUrl($param['path'] . $fileName), //完整的URL "https://.....hhsKzZ.jpg"
|
||||
"thumb" => '', //缩略图(预览图) "https://.....hhsKzZ.jpg_thumb.jpg"
|
||||
|
||||
Reference in New Issue
Block a user