我在 ubuntu 18.4 上创建 Laravel 项目。
我上传我的项目/var/www/html/
并上传图片home/sun/download/
运行此代码后:
$imageName = "thumb_{$size}.{$extension}";
$routePath = $url . '/products/' . $product->id . '/';
Image::make($file->path())->resize($size, null, function ($constraint) {
$constraint->aspectRatio();
})->save($routePath, $imageName);
显示此错误:
"Can't write image data to path (/home/sun/download/products/2/)"
如何发出这个问题?