-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
有些网络资源的图片的后缀和图片实体是对不上的,比如上传的文件本来是1.png,人为的改了后缀为1.jpg,上传的网络上访问的资源成http://xxx.com/1.pn改为http://xxx.com/1.jpg 文件后缀。这样导致fileSuffix判断分支取到的是jpeg而不上png
@imagecreatefromjpge($file) 就会返回false 导致失败,建议改成 getimagesize($file) 去获取文件的mime。获取到mime的值image/jpeg 。然后拿到文件的后缀去生成图片资源。

Metadata
Metadata
Assignees
Labels
No labels