arraypress / wp-s3-browser
A comprehensive PHP library for integrating S3-compatible storage providers with WordPress. Features advanced media browser, upload/download management, presigned URLs, and support for multiple providers including AWS S3, Cloudflare R2, DigitalOcean Spaces, and more.
Requires
- php: >=8.3
- arraypress/wp-breadcrumbs: ^1.1
- arraypress/wp-composer-assets: ^2.2
- arraypress/wp-s3-signer: ^2.0
Requires (Dev)
- phpcompatibility/phpcompatibility-wp: ^2.1
- phpunit/phpunit: ^12.0
- squizlabs/php_codesniffer: ^3.13.5
- wp-coding-standards/wpcs: ^3.4
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v4.12.3
- v4.12.2
- v4.12.1
- v4.12.0
- v4.11.1
- v4.11.0
- v4.10.0
- v4.9.0
- v4.8.1
- v4.8.0
- v4.7.2
- v4.7.1
- v4.7.0
- v4.6.1
- v4.6.0
- v4.5.1
- v4.5.0
- v4.4.0
- v4.3.0
- v4.2.0
- v4.1.0
- v4.0.1
- v4.0.0
- v3.1.2
- 3.1.0
- 3.0.0
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.0
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- v1.0.0
This package is auto-updated.
Last update: 2026-09-04 18:07:21 UTC
README
A media browser for S3-compatible storage, inside the WordPress admin.
What it does
Files sold as downloads usually live in object storage rather than the media library, and the moment they do, attaching one to a product means copying a key out of another tab.
This adds a browser beside the media library: buckets, folders, search,
upload and a link back into whatever field asked for it. Underneath it is
arraypress/wp-s3-signer, so nothing is made public and uploads go straight
from the browser to storage rather than through PHP.
Features
- Browse buckets and folders from the admin, without leaving WordPress
- Upload straight to storage from the browser, bypassing the PHP upload limit
- Attach a file to a field, the way the media library does
- Confine a browser to one bucket, or to certain post types
- Require a capability, so not everyone who can edit can see storage
- Run more than one browser on a site, each on its own provider and context
- Work against R2, B2, Wasabi, DigitalOcean, MinIO or anything S3-compatible
Installation
composer require arraypress/wp-s3-browser
Quick start
use ArrayPress\S3\Browser; use ArrayPress\S3\Provider; $browser = new Browser( Provider::r2( 'your-account-id' ), $access_key, $secret_key, [ 'download' ], // post types this browser appears for; [] means all 'my-bucket', // bucket it opens on 'upload_files', // capability required to use it 'edd' // context: which integration this instance serves ); $browser->set_allowed_buckets( [ 'my-bucket' ] );
Confining it to one bucket is worth doing whenever you can — the credentials usually reach more than the browser should.
Uploads need CORS
Uploading from the browser is a cross-origin request, so the bucket has to
allow it. Setting that rule needs an admin token: a key with Object Read &
Write cannot call PutBucketCors, and the error it returns says
AccessDenied, which reads like a bucket-permissions problem rather than a
key-permissions one.
Requirements
- PHP 8.3 or later
- WordPress 7.1 or later
- Credentials for an S3-compatible provider
License
GPL-2.0-or-later