【问题标题】:How do I get the cause of Storage::put returning false?如何获取 Storage::put 返回 false 的原因?
【发布时间】:2021-11-12 22:07:33
【问题描述】:

我正在尝试保存图像,但是当我将其保存在本地时它返回“true”,但在另一个磁盘上它返回“false”是否可以检索它返回“false”的原因?

        $ImgSource = (string) Image::make($this->photo)->encode('jpg', 75);

        $local = Storage::put("temp/file.jpg", $ImgSource); //return true
        $update = Storage::disk('mycloud')->put($path, $ImgSource); //return false

我澄清一下,我已经上传了文本文件和其他图片,但是,有些文件有这个问题,我的目的是找出错误的原因。

【问题讨论】:

    标签: php laravel filesystems storage


    【解决方案1】:

    可能系统无法在其他磁盘上创建路径/文件。检查磁盘用户的权限。

    【讨论】:

      猜你喜欢
      • 2019-04-25
      • 2012-08-25
      • 1970-01-01
      • 1970-01-01
      • 2016-10-16
      • 1970-01-01
      • 2019-12-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多