|
|
@@ -179,11 +179,11 @@ class UploadForm extends Model {
|
|
|
unlink($this->file->tempName);
|
|
|
} else {
|
|
|
// 生成文件名
|
|
|
-// $fileName = Tool::generateId(false);
|
|
|
- $fileName = $this->file->baseName;
|
|
|
+ $fileName = Tool::generateId(false);
|
|
|
+// $fileName = $this->file->baseName;
|
|
|
// 保存在本地
|
|
|
-// $filePath = \Yii::$app->localUpload . $fileNameArray['FILE_NAME'];
|
|
|
- $localPath = '/ng-stage/Volumes/HDD/workshop/old/ar.upload.ming/files/' . $fileName . '.' . $this->file->extension;
|
|
|
+ $localPath = \Yii::$app->localUpload . $fileName . '.' . $this->file->extension;
|
|
|
+// $localPath = '/ng-stage/Volumes/HDD/workshop/old/ar.upload.ming/files/' . $fileName . '.' . $this->file->extension;
|
|
|
if (!$this->file->saveAs($localPath)) {
|
|
|
throw new Exception('Failed');
|
|
|
}
|