An open API service indexing awesome lists of open source software.

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

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();
}
```