|
|
@@ -179,9 +179,9 @@ class UploadForm extends Model {
|
|
|
unlink($this->file->tempName);
|
|
|
} else {
|
|
|
// 生成文件名
|
|
|
- $fileName = Tool::generateId(false);
|
|
|
+// $fileName = Tool::generateId(false);
|
|
|
+ $fileName = $this->file->baseName;
|
|
|
// 保存在本地
|
|
|
- LoggerTool::info([$fileName, $this->file]);
|
|
|
$localPath = '/ng/Volumes/HDD/workshop/old/ar.upload.ming/files/' . $fileName . '.' . $this->file->extension;
|
|
|
if (!$this->file->saveAs($localPath)) {
|
|
|
throw new Exception('Failed');
|
|
|
@@ -189,7 +189,6 @@ class UploadForm extends Model {
|
|
|
$uploadInfo = [
|
|
|
'fileName' => $fileName . '.' . $this->file->extension,
|
|
|
'category' => $uploadCategory,
|
|
|
-// 'url' => $localPath,
|
|
|
'url' => $fileName . '.' . $this->file->extension,
|
|
|
'fileSize' => null,
|
|
|
'md5' => null,
|