jplarar/s3-bundle
Composer 安装命令:
composer require jplarar/s3-bundle
包简介
A simple Symfony2 bundle for the API for AWS S3.
README 文档
README
A simple Symfony2 bundle for the API for AWS S3.
Setup
Step 1: Download JplararS3Bundle using composer
Add S3 Bundle in your composer.json:
{ "require": { "jplarar/s3-bundle": "dev-master" } }
Now tell composer to download the bundle by running the command:
$ php composer.phar update "jplarar/s3-bundle"
Step 2: Enable the bundle
Enable the bundle in the kernel:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Jplarar\S3Bundle\JplararS3Bundle() ); }
Step 3: Add configuration
# app/config/config.yml jplarar_s3: amazon_s3: amazon_s3_key: %amazon_s3_key% amazon_s3_secret: %amazon_s3_secret% amazon_s3_bucket: %amazon_s3_bucket% amazon_s3_region: %amazon_s3_region%
Usage
Using service
<?php $s3Client = $this->get('amazon_s3_client'); ?>
##Example
###Upload new file to S3
<?php $s3Client->write($key, $content, $mimeType); ?>
统计信息
- 总下载量: 1.29k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-11