|
@@ -20,7 +20,7 @@ class UploadController extends Controller
|
|
|
// $type=$request->file('image')->getClientMimeType();
|
|
|
// //获取文件的绝对路径,但是获取到的在本地不能打开
|
|
|
$filePath = $request->file('image')->getRealPath();
|
|
|
- if (in_array($kuoname, ['jpg', 'jpeg', 'png'])) {
|
|
|
+ if (in_array($kuoname, ['jpg', 'gif', 'png'])) {
|
|
|
$width = Image::make($filePath)->width();
|
|
|
$height = Image::make($filePath)->height();
|
|
|
//要保存的文件名 时间+扩展名
|
|
@@ -50,7 +50,7 @@ class UploadController extends Controller
|
|
|
$kuoname = $files[$i]->getClientOriginalExtension();
|
|
|
$filePath = $files[$i]->getRealPath();
|
|
|
//要保存的文件名 时间+扩展名
|
|
|
- if (in_array($kuoname, ['jpg', 'jpeg', 'png'])) {
|
|
|
+ if (in_array($kuoname, ['jpg', 'gif', 'png'])) {
|
|
|
$width = Image::make($filePath)->width();
|
|
|
$height = Image::make($filePath)->height();
|
|
|
//要保存的文件名 时间+扩展名
|