How do I get the cause of Storage::put returning false?

Viewed 126

I am trying to save an image, however when I save it locally it returns "true", but on another disk it returns "false" Is it possible to retrieve the cause why it returns '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

I clarify that I have already uploaded text files and other images, however, some files have this problem and my intention is to find the cause of the error.

1 Answers

Maybe system can't make path/file on other disk. Check permissions of disk user.

Related