Commit 73a60306 authored by zhoujun's avatar zhoujun

修改默认值

parent 5da179f9
......@@ -57,7 +57,7 @@ class ApkService implements IApkService
$row->md5 = $md5;
$row->size = $postData['apk_size'];
$row->origin_name = $postData['apk_origin_name'];
$row->remark = $postData['remark'];
$row->remark = $postData['remark'] ?? '';
if($row->save()){
unset($postData['_token']);
OptionLogModel::getAddLog('apk','add',$postData,Auth::id(),$row->id,'上传apk');
......
......@@ -47,13 +47,13 @@ class Receiver
public function renameTempFile($fileName)
{
//$savedFileHash = $this->generateSavedFileHash($this->uploadPartialFile);
$savedFileHash = $fileName;
$savedFileHash = $this->generateSavedFileHash($this->uploadPartialFile);
//$savedFileHash = $fileName;
if ( RedisHandler::hashExists($savedFileHash) ) {
$this->savedPath = RedisHandler::getFilePathByHash($savedFileHash);
} else {
//$this->savedPath = ConfigMapper::get('FILE_DIR') . DIRECTORY_SEPARATOR . ConfigMapper::get('FILE_SUB_DIR') . DIRECTORY_SEPARATOR . $savedFileHash . '.' . $this->uploadExt;
$this->savedPath = ConfigMapper::get('FILE_DIR') . DIRECTORY_SEPARATOR . ConfigMapper::get('FILE_SUB_DIR') . DIRECTORY_SEPARATOR . $savedFileHash;
$this->savedPath = ConfigMapper::get('FILE_DIR') . DIRECTORY_SEPARATOR . ConfigMapper::get('FILE_SUB_DIR') . DIRECTORY_SEPARATOR . $savedFileHash . '.' . $this->uploadExt;
//$this->savedPath = ConfigMapper::get('FILE_DIR') . DIRECTORY_SEPARATOR . ConfigMapper::get('FILE_SUB_DIR') . DIRECTORY_SEPARATOR . $savedFileHash;
if ( ! @rename($this->uploadPartialFile, ConfigMapper::get('UPLOAD_PATH') . DIRECTORY_SEPARATOR . $this->savedPath) ) {
return false;
......
File added
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment