Directus存储适配器AWS S3错误:没有写权限:

问题描述

我决定在我们的一个项目中将Directus用作无头CMS。为了存储媒体文件,我们决定使用AWS S3作为存储适配器。我已经按照Directus文档中的所有说明进行操作,如何设置S3的配置,但是我一直在收到此错误:

message: "No permission to write: 122d303f-b69a-48f8-8138-8f3404b3c992.jpg"

我已经从CLI命令尝试了AWS S3存储桶,我可以在那里上传文件并列出文件,但是从Directus上我没有写错误的权限。

Directus中的存储配置如下:

 'storage' => [
    'adapter' => 's3',// What storage adapter to use for files
                            // Defaults to the local filesystem. Other natively supported
                            // options include: Amazon S3,Aliyun OSS,Azure
                            // You'll need to require the correct flysystem adapters through Composer
                            // See https://docs.directus.io/extensions/storage-adapters.html#using-aws-s3
    'root' => '/originals',// Where files are stored on disk
    'thumb_root' => '/thumbnails',// Where thumbnails are stored on disk
    'root_url' => '##S3_URL##/originals',// Where files are accessed over the web        
    // 'proxy_downloads' => false,// Use an internal proxy for downloading all files
    // S3
    ////////////////////////////////////////
    'key'    => '##S3_KEY##','secret' => '##S3_SECRET##','region' => '##S3_REGION##','version' => 'latest','bucket' => '##S3_BUCKET##','options' => [
       'ACL' => 'public-read','CacheControl' => 'max-age=604800'
    ],],

任何人都可以对此提供任何见识吗?

谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)