在我的Laravel应用程序中,我有一个供登录用户使用亚马逊S3的图库。
现在,我以这样的方式下载每个缩略图和图像:
public function download($file_url){ // is safe, but slow...
$mime = \Storage::disk('s3')->getDriver()->getMimetype($file_url);
$size = \Storage::disk('s3')->getDriver()->getSize($file_url);
$respons
我试着从亚马逊s3下载文件到本地存储。下载成功后,文件就会出现在本地存储中,但是文件是空的,没有内容。好像在密码里漏掉了什么。需要你的帮助朋友们。提前谢谢
下面是代码:
<?php
namespace App\Console\Library;
require 'vendor/autoload.php';
use Aws\S3\S3Client;
use Aws\S3\Exception\S3Exception;
use Storage;
class DownloadAWS
{
public function downloadFile(){