我试图找出如何添加元数据或标头(Expires,CacheControl等)。我想要具有标头的全局默认值,这在Laravel 5和S3 Amazon中有效,仅更改config / filesystems.php文件即可:
's3' => [
'driver' => 's3',
'key' => env('AWS_KEY'),
'secret' => env('AWS_SECRET'),
'region' => env('AWS_REGION'),
'bucket' => env('AWS_BUCKET'),
'source' => env('S3_SOURCE'),
'options' => ['CacheControl' => 'max-age=604800, public', 'Expires' => gmdate('D, d M Y H:i:s \G\M\T', strtotime('+7 day'))]
]
'oss' => [
'driver' => 'oss',
'key' => env('OSS_ACCESS_KEY_ID'),
'secret' => env('OSS_ACCESS_KEY_SECRET'),
'endpoint' => env('OSS_ENDPOINT'),
'bucket' => env('OSS_BUCKET'),
'region' => env('OSS_REGION'),
'source' => env('OSS_SOURCE')
'options' => ['CacheControl' => 'max-age=604800, public', 'Expires' => gmdate('D, d M Y H:i:s \G\M\T', strtotime('+7 day'))]
]
此代码在Alicloud OSS(对象存储服务)中不起作用