getClientOriginalExtension(); // $fileName = $clientName . '.' . $file->getClientOriginalExtension(); \Log::info($filePath. $fileName); if($isImage){ if (!Image::make($file)->resize($sizex, $sizey)->save($filePath. $fileName)) return false; }else{ $file->move($filePath, $fileName); /* //正常缩略图 $ffmpeg = FFMpeg\FFMpeg::create(array( 'ffmpeg.binaries' => '/usr/bin/ffmpeg', 'ffprobe.binaries' => '/usr/bin/ffprobe' )); $video = $ffmpeg->open($filePath. $fileName); $vpath = $filePath; if (!file_exists($vpath)) { if (!@mkdir($vpath, 0755, true)) { return ErrorCode::ATTACHMENT_MKDIR_FAILED; } } $pic = $vpath. $fileName.'.jpg'; \Log::info($pic); $video ->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(1)) ->save( $pic );*/ } return '/upload/' .$dir.'/'. $fileName; } }