Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/keygenqt/yii2-upload-s3
Checked in php5.3 (yii1)
https://github.com/keygenqt/yii2-upload-s3
extensions yii1 yii2
Last synced: 11 days ago
JSON representation
Checked in php5.3 (yii1)
- Host: GitHub
- URL: https://github.com/keygenqt/yii2-upload-s3
- Owner: keygenqt
- License: other
- Created: 2016-02-15T10:21:09.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-22T13:57:36.000Z (over 8 years ago)
- Last Synced: 2024-10-18T00:30:38.612Z (about 1 month ago)
- Topics: extensions, yii1, yii2
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
upload-s3
===================Upload file to s3. Checked yii2 and yii1 (php 5.3)
## Installation
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either add
```
"require": {
"keygenqt/upload-s3": "*"
}
```of your `composer.json` file.
## Latest Release
The latest version of the module is v0.5.0 `BETA`.
## Usage
Config:
```php
'uploadS3' => [
'class' => 'keygenqt\uploadS3\UploadS3',
'key' => '...',
'secret' => '...',
'bucket' => '...',
'static_url' => 'http://domen.com/', (optional)
]
```Upload:
```php
public function uploadIcon($path, $name)
{
if(($url = Yii::$app->uploadS3->upload($path, $name)) !== false) {
return $url;
}
return false;
}
```## License
**upload-s3** is released under the BSD 3-Clause License. See the bundled `LICENSE.md` for details.