aimeos / ai-filesystem
Aimeos 文件系统层扩展
2024.07.1
2024-07-02 07:50 UTC
Requires
- php: ^8.0.11
- aimeos/aimeos-core: 2024.07.*
- league/flysystem: ~3.0
Requires (Dev)
- phpunit/phpunit: ~10.0||~11.0
- dev-master
- 2024.07.x-dev
- 2024.07.1
- 2024.04.x-dev
- 2024.04.1
- 2024.01.x-dev
- 2023.10.x-dev
- 2023.10.1
- 2023.07.x-dev
- 2023.07.1
- 2023.04.x-dev
- 2023.04.1
- 2023.01.x-dev
- 2022.10.x-dev
- 2022.10.2
- 2022.10.1
- 2022.07.x-dev
- 2022.07.1
- 2022.04.x-dev
- 2022.04.1
- 2022.01.x-dev
- 2021.10.x-dev
- 2021.10.2
- 2021.10.1
- 2021.07.x-dev
- 2021.07.1
- 2021.04.x-dev
- 2021.04.1
- 2021.01.x-dev
- 2020.10.x-dev
- 2020.10.2
- 2020.10.1
- 2020.07.x-dev
- 2020.07.1
- 2020.04.x-dev
- 2020.04.1
- 2020.01.x-dev
- 2020.01.1
- 2019.10.x-dev
- 2019.10.1
- 2019.07.x-dev
- 2019.07.1
- 2019.04.x-dev
- 2019.04.2
- 2019.04.1
- 2019.01.x-dev
- 2019.01.1
- 2018.10.x-dev
- 2018.10.2
- 2018.10.1
- 2018.07.x-dev
- 2018.07.1
- 2018.04.x-dev
- 2018.04.1
- 2018.01.x-dev
- 2018.01.2
- 2018.01.1
- 2017.10.x-dev
- 2017.10.1
- 2017.07.x-dev
- 2017.07.2
- 2017.07.1
- 2017.04.x-dev
- 2017.04.1
- 2017.03.x-dev
- 2017.02.x-dev
- 2017.01.x-dev
- 2017.01.2
- 2017.01.1
- 2016.10.x-dev
- 2016.10.1
- 2016.07.x-dev
- 2016.07.2
- 2016.07.1
- 2016.04.x-dev
- 2016.01.x-dev
- 2016.01.2
- dev-scrutinizer-patch-1
This package is auto-updated.
Last update: 2024-09-02 08:46:29 UTC
README
Aimeos 文件系统扩展
Aimeos 文件系统扩展包含存储文件在云端、远程服务器或其他存储设施的适配器。
目录
安装
与其他 Aimeos 扩展一样,最简单的方式是通过 composer 安装。如果您还没有安装 composer,可以在命令行上执行以下字符串来下载它
php -r "readfile('https://getcomposer.org.cn/installer');" | php -- --filename=composer
然后,使用 composer 安装扩展
composer req aimeos/ai-filesystem
配置
所有文件系统适配器都配置在 resource/fs
配置键下,例如在您的配置文件的资源部分
'resource' => [
'fs' => [
// file system adapter specific configuration
],
],
Amazon S3
所需适配器
composer req league/flysystem-aws-s3-v3
配置
'fs' => [
'adapter' => 'FlyAwsS3',
'credentials' => [
'key' => 'your-key',
'secret' => 'your-secret',
],
'region' => 'your-region',
'version' => 'latest|api-version',
'bucket' => 'your-bucket-name',
'prefix' => 'your-prefix', // optional
'baseurl' => 'https://your-s3-endpoint' // 'https://bucket-name.s3.us-east-2.amazonaws.com'
],
Azure
所需适配器(仅限 PHP 8.x)
composer req league/flysystem-azure-blob-storage
配置
'fs' => [
'adapter' => 'FlyAzure',
'endpoint' => 'DefaultEndpointsProtocol=https;AccountName=your-account;AccountKey=your-api-key',
'container' => 'your-container',
'prefix' => 'your-prefix', // optional
],
Dropbox
所需适配器
composer req spatie/flysystem-dropbox
配置
'fs' => [
'adapter' => 'FlyDropbox',
'accesstoken' => 'your-access-token'
],
FTP
所需适配器
composer req league/flysystem-ftp
配置
'fs' => [
'adapter' => 'FlyFtp',
'host' => 'your-hostname-or-ipaddress',
'username' => 'your-username',
'password' => 'your-password',
'root' => '/path/to/basedir',
'port' => 21, // optional
'passive' => true, // optional
'ssl' => true, // optional
'timeout' => 30, // optional
'utf8' => false, // optional
'transferMode' => FTP_BINARY, // optional
'systemType' => null, // 'windows' or 'unix'
'ignorePassiveAddress' => null, // true or false
'timestampsOnUnixListingsEnabled' => false, // true or false
'recurseManually' => true // true
],
Google Cloud
所需适配器
composer req league/flysystem-google-cloud-storage
配置
'fs' => [
'adapter' => 'FlyGoogleCloud',
'keyFile' => json_decode(file_get_contents('/path/to/keyfile.json'), true), // alternative
'keyFilePath' => '/path/to/keyfile.json', // alternative
'projectId' => 'myProject', // alternative
'prefix' => 'your-prefix' // optional
],
有关身份验证详情,请参阅 Google Cloud 客户端文档。
本地
配置
'fs' => [
'adapter' => 'FlyLocal',
'basedir' => 'your-basedir-path',
],
内存
所需适配器
composer req league/flysystem-memory
配置
'fs' => [
'adapter' => 'FlyMemory',
],
SFTP
所需适配器
composer req league/flysystem-sftp
配置
'fs' => [
'adapter' => 'FlySftp',
'host' => 'your-hostname-or-ipaddress',
'port' => 22, // optional
'username' => 'your-username', // optional
'password' => 'your-password', // optional
'privateKey' => 'path/to/or/contents/of/private/key', // optional
'passphrase' => 'passphrase-for-the-private-key', // optional
'fingerprint' => 'fingerprint-string', // optional
'timeout' => 10, // optional
'retry' => 4, // optional
'agent' => true // optional
],
WebDAV
所需适配器(仅限 PHP 8.x)
composer req league/flysystem-webdav
配置
'fs' => [
'adapter' => 'FlyWebdav',
'baseUri' => 'your-webdav-uri',
'proxy' => 'your-proxy', // optional
'userName' => 'your-username', // optional
'password' => 'your-password', // optional
'authType' => 'authentication-type', // optional, 1=Basic, 2=Digest, 4=NTLM
'encoding' => 'encoding-type', // optional, 1=None, 2=Deflate, 4=Gzip, 7=All
'prefix' => 'your-prefix', // optional
],
Zip 存档
所需适配器
composer req league/flysystem-ziparchive
配置
'fs' => [
'adapter' => 'FlyZip',
'filepath' => '/path/to/zipfile',
],
许可
Aimeos 文件系统扩展根据 LGPLv3 开源许可协议授权,并可免费使用。