dongyonglie5132 2015-11-30 10:44
浏览 49

无法将图像保存到laravel中的公共目录

Hi I'm getting this error message while trying to save an image using Intervention/image .

{
    "error": {
        "type": "Intervention\\Image\\Exception\\NotWritableException",
        "message": "Can't write image data to path (/home/sourav/Public/master/v1.1.01/public/images/collections/Java/backgrdImageUrl.jpg)",
        "file": "/home/sourav/Public/master/v1.1.01/vendor/intervention/image/src/Intervention/Image/Image.php",
        "line": 143
    }
}

Here is the code within my function setBackgroundImageUrl($image)

$img = Image::make($image);
$img->save(public_path() . '/images/collections/' . $this->getCollectionTitle() . '/backgrdImageUrl.jpg');

It looks like a permissions issue but I tried chmod -R 777 /images/collections at it still throws the same error message.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 双层网络上信息-疾病传播
    • ¥50 paddlepaddle pinn
    • ¥20 idea运行测试代码报错问题
    • ¥15 网络监控:网络故障告警通知
    • ¥15 django项目运行报编码错误
    • ¥15 请问这个是什么意思?
    • ¥15 STM32驱动继电器
    • ¥15 Windows server update services
    • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
    • ¥15 模糊pid与pid仿真结果几乎一样