https://github.com/tbetool/aws-s3-service-php
Easy to use S3 services of Amazon AWS
https://github.com/tbetool/aws-s3-service-php
Last synced: 3 months ago
JSON representation
Easy to use S3 services of Amazon AWS
- Host: GitHub
- URL: https://github.com/tbetool/aws-s3-service-php
- Owner: TBETool
- License: gpl-3.0
- Created: 2018-03-06T08:16:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-20T18:04:17.000Z (almost 7 years ago)
- Last Synced: 2025-01-09T10:17:26.429Z (5 months ago)
- Language: PHP
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aws-s3-service-php
Easy to use S3 services of Amazon AWS## Installation
```
composer require tbetool/aws-s3-service-php
```## Initialize
```
$s3Service = new S3Service(S3_KEY, S3_SECRET, S3_BUCKET);
```
### set region
```
$s3Service->setS3Region('us-east-1');
```
### set version
```
$s3Service->setS3Version('latest');
```
### set HTTP Verfity
```
$s3Service->setS3HttpVerify(false);
```# upload
```
try {$s3_url = $s3Service->moveToS3($local_file, $key, $acl);
return $s3_url;
} catch (Exception $e) {
print($e->getMessage();
}
```