PHP code example of vkr / s3-uploader-bundle
1. Go to this page and download the library: Download vkr/s3-uploader-bundle 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/ */
vkr / s3-uploader-bundle example snippets
$s3Uploader = $this->get('vkr_s3_uploader.s3_uploader');
$s3Uploader->setUploadDir('s3_upload_dir');
$file = new Symfony\Component\HttpFoundation\File\File('path/to/file/filename');
try {
$uploader->setFile($file)->upload()->checkIfSuccessful();
} catch (\Exception $e) {
...
}