File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ cloud providers by providing corresponding adapters in the configuration.
1010* [ DigitalOcean Spaces] ( #digitalocean-spaces )
1111* [ Scaleway Object Storage] ( #scaleway-object-storage )
1212* [ Google Cloud Storage] ( #google-cloud-storage )
13+ * [ Cloudflare R2] ( #cloudflare-r2 )
1314
1415## Azure
1516
@@ -157,6 +158,32 @@ flysystem:
157158 bucket : ' %env(SCALEWAY_SPACES_BUCKET)%'
158159` ` `
159160
161+ ## Cloudflare R2
162+
163+ The Cloudflare R2 is compatible with the AWS S3 API, meaning that you can use the same configuration
164+ as for a AWS storage. For example:
165+
166+ ` ` ` yaml
167+ # config/packages/flysystem.yaml
168+
169+ services :
170+ cloudflare_r2_client :
171+ class : ' AsyncAws\S3\S3Client'
172+ arguments :
173+ -
174+ endpoint : ' %env(CLOUDFLARE_R2_ENDPOINT)%'
175+ accessKeyId : ' %env(CLOUDFLARE_R2_ID)%'
176+ accessKeySecret : ' %env(CLOUDFLARE_R2_SECRET)%'
177+
178+ flysystem :
179+ storages :
180+ cdn.storage :
181+ adapter : ' asyncaws'
182+ options :
183+ client : ' cloudflare_r2_client'
184+ bucket : ' %env(CLOUDFLARE_R2_BUCKET)%'
185+ ` ` `
186+
160187## Next
161188
162189[Interacting with FTP and SFTP servers](https://github.com/thephpleague/flysystem-bundle/blob/master/docs/3-interacting-with-ftp-and-sftp-servers.md)
You can’t perform that action at this time.
0 commit comments