1. Go to this page and download the library: Download reliv/aws-sdk-php-zf2-zf3fc 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/ */
$request = new Request();
$files = $request->getFiles();
// e.g., $files['my-upload']['tmp_name'] === '/tmp/php5Wx0aJ'
// e.g., $files['my-upload']['name'] === 'profile-picture.jpg'
// Fetch the filter from the Filter Plugin Manager to automatically handle dependencies
$filter = $serviceLocator->get('FilterManager')->get('S3RenameUpload');
$filter->setOptions(array(
'bucket' => 'my-bucket',
'target' => 'users/5/profile-picture.jpg',
'overwrite' => true
));
$filter->filter($files['my-upload']);
// File has been renamed and moved to 'my-bucket' bucket, inside the 'users/5' path
use Zend\Session\SessionManager;
// Assume we are in a context where $serviceLocator is a ZF2 service locator.
$saveHandler = $serviceLocator->get('Aws\Session\SaveHandler\DynamoDb');
$manager = new SessionManager();
$manager->setSaveHandler($saveHandler);
json
{
"ws/aws-sdk-php-zf2": "1.2.*"
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.