1. Go to this page and download the library: Download indielab/yii2s3 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/ */
Yii::$app->s3->upload('path/to/the/file.jpg', [
'override' => true, // whether existing file should be overriden or not
'Key' => 'CacheControlTestFile.txt', // Define a specific name for the file instead of the source file name
'CacheControl' => 'max-age=' . strtotime('+1 year') // Add cache controler options
]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.