...
|
...
|
@@ -258,23 +258,23 @@ class BusinessController extends Controller |
|
|
if ($info) {
|
|
|
$saveName = $info->getSaveName();
|
|
|
$originalName = $info->getInfo('name');//name,type,size
|
|
|
$fileSize = $info->getInfo('size');
|
|
|
$suffix = $info->getExtension();
|
|
|
|
|
|
$fileKey = $fileMd5 . md5($fileSha1);
|
|
|
|
|
|
$userId = $this->getUser()['user_id'];
|
|
|
Db::name('asset')->insert([
|
|
|
'user_id' => $userId,
|
|
|
'file_key' => $fileKey,
|
|
|
'filename' => $originalName,
|
|
|
'file_size' => $fileSize,
|
|
|
'file_path' => cmf_get_asset_url($saveName),
|
|
|
'file_md5' => $fileMd5,
|
|
|
'file_sha1' => $fileSha1,
|
|
|
'create_time' => time(),
|
|
|
'suffix' => $suffix
|
|
|
]);
|
|
|
// $fileSize = $info->getInfo('size');
|
|
|
// $suffix = $info->getExtension();
|
|
|
//
|
|
|
// $fileKey = $fileMd5 . md5($fileSha1);
|
|
|
//
|
|
|
// $userId = $this->getUser()['user_id'];
|
|
|
// Db::name('asset')->insert([
|
|
|
// 'user_id' => $userId,
|
|
|
// 'file_key' => $fileKey,
|
|
|
// 'filename' => $originalName,
|
|
|
// 'file_size' => $fileSize,
|
|
|
// 'file_path' => cmf_get_asset_url($saveName),
|
|
|
// 'file_md5' => $fileMd5,
|
|
|
// 'file_sha1' => $fileSha1,
|
|
|
// 'create_time' => time(),
|
|
|
// 'suffix' => $suffix
|
|
|
// ]);
|
|
|
|
|
|
// $storage = cmf_get_option('storage');
|
|
|
|
...
|
...
|
|