loantap / aws-s3
AWS s3 集成,适用于优秀的企业
1.1
2021-02-03 09:08 UTC
Requires
- php: >=7.0
- aws/aws-sdk-php: ^3.171
- composer/installers: ~1.0
- oomphinc/composer-installers-extender: ^2.0
This package is not auto-updated.
Last update: 2024-09-26 03:01:58 UTC
README
Aws S3 短代码,将处理所有 aws s3 操作,如获取、获取等
您需要 awesome-enterprise 才能使用此https://github.com/WPoets/awesome-enterprise
composer require loantap/aws-s3
从 s3 桶文件夹获取所有文件
输入
config : <array>
path : <string>
search : <string>
bucket_name : <string>
```
[aws_s3.get_files config=<config-array> path={template.path} search="<search>" bucket_name="<bucket-name>" o.set=template.ack/]
```
获取单个文件内容
###### Input:
config : <array>
path : <string>
bucket_name : <string>
```
[aws_s3.get_file_contents config="<config-array>" path=<path> o.set=template.ack/]
```
保存文件
###### Input:
config : <array>
path : <string>
contents : <string>
```
[aws_s3.put_file_contents config="<config-array>" path="<path>" contents="<content>" o.set=template.ack/]
```
删除单个文件
###### Input:
config : <array>
path : <string>
bucket_name : <string>
```
[aws_s3.delete_file config=<config-array> path={template.path} bucket_name="<bucket-name>" o.set=template.ack/]
```
删除所有文件
###### Input:
config : <array>
path : <string>
bucket_name : <string>
```
[aws_s3.delete_all_files config= path={template.path} bucket_name="" o.set=template.ack/]
```
下载单个文件
输入
config : <array>
path : <string>
bucket_name : <string>
```
[aws_s3.download_file config=<config-array> path={template.path} bucket_name="<bucket-name>" o.set=template.ack/]
```
下载所有文件
###### Input:
config : <array>
path : <string>
bucket_name : <string>
download_path :<string>
```
[aws_s3.download_all config=<config-array> path={template.path} bucket_name="<bucket-name>" download_path="/var/tmp/cibil/{token}.zip" o.set=template.ack/]
```
预签名 URL 和获取文件数据
###### Input:
config : <array>
source : <string>
bucket_name : <string>
destination :<string>
```
[aws_s3.download_public_file config=<config-array> source="<source>" destination="{destination}" bucket_name="<bucket-name>" o.set=template.ack/]
```
在浏览器上显示文件
###### Input:
config : <array>
path : <string>
bucket_name : <string>
```
[aws_s3.read_file config=<config-array> path=<template.path> bucket_name="<bucket-name>" o.set=template.ack/]
```
将本地文件移动到 s3
###### Input:
config : <array>
source : <string>
destination : <string>
bucket_name : <string>
```
[aws_s3.move_file_to_bucket source="{template.local_path}/{template.file_name}" destination="<template.s3_path>" config=<config-array> bucket_name="<bucket-name>" o.set=template.ack/]
```