PHP code example of arraypress / wp-s3-browser

1. Go to this page and download the library: Download arraypress/wp-s3-browser library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

arraypress / wp-s3-browser example snippets


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