Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/asp.net-mvc-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon s3 突变子不';t fire用于图像上传_Amazon S3_Backpack For Laravel - Fatal编程技术网

Amazon s3 突变子不';t fire用于图像上传

Amazon s3 突变子不';t fire用于图像上传,amazon-s3,backpack-for-laravel,Amazon S3,Backpack For Laravel,在Backpack for Laravel中的一个项目中工作,该项目涉及上传图像、视频等。从一个简单的图像上传开始,我的模型中有一个变量,如下所示: public function setThumbnailAttribute($value) { $attribute_name = "Thumbnail_URL"; $disk = "s3"; $destination_path = "images"; $this->uploadFileToDisk($val

在Backpack for Laravel中的一个项目中工作,该项目涉及上传图像、视频等。从一个简单的图像上传开始,我的模型中有一个变量,如下所示:

public function setThumbnailAttribute($value)
{
    $attribute_name = "Thumbnail_URL";
    $disk = "s3";
    $destination_path = "images";

    $this->uploadFileToDisk($value, $attribute_name, $disk, $destination_path);
}
但它似乎没有启动,每当文件“上传”时,它都会显示一个“C:\Windows\Temp\php6803.tmp”作为位置

我的领域:

$this->crud->addField([
        'name' => 'Thumbnail',
        'label' => 'Thumbnail',
        'type' => 'image',
        'upload' => true,
        'disk' => 's3' 
    ]);
以及filesystems.php中的's3'磁盘:

's3' => [
        'driver' => 's3',
        'key' => env('AWS_KEY'),
        'secret' => env('AWS_SECRET'),
        'region' => env('AWS_REGION'),
        'bucket' => env('AWS_BUCKET'),
    ],
我已经仔细检查了缩略图URL是否可填充。我真的不知道我错过了什么

public function setThumbnailAttribute($value)
{
$attribute_name = "Thumbnail_URL";
$disk = "s3";
$destination_path = "images";

**MISSING** $this->attributes[$attribute_name] = '....' (image path/filename)

$this->uploadFileToDisk($value, $attribute_name, $disk, $destination_path);

}

谢谢你的帮助!但这并没有改变我所看到的任何东西,仍然将其存储在Ctemp中,S3中没有任何内容。