anglemx/file-storage-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

anglemx/file-storage-bundle

最新稳定版本:v1.0.2

Composer 安装命令:

composer require anglemx/file-storage-bundle

包简介

Multi-backend file storage bundle (local, S3, Azure)

README 文档

README

Multi-backend file storage bundle. Supported backends: local, AWS S3, Azure Storage Blob.

Supported types:

  • local
  • aws_s3
  • azure_blob_storage

create a configuration file in symfony/config/packages/angle_file_storage.yaml:

angle_file_storage:
    type: local
    container: file-storage
    username: null
    secret: null
    aws_region: null

or link it to the .env variables:

angle_file_storage:
  type: "%env(ANGLE_FILE_STORAGE_TYPE)%"
  container: "%env(ANGLE_FILE_STORAGE_CONTAINER)%"
  username: "%env(ANGLE_FILE_STORAGE_USERNAME)%"
  secret: "%env(ANGLE_FILE_STORAGE_SECRET)%"
  aws_region: "%env(ANGLE_FILE_STORAGE_AWS_REGION)%"

and then in the .env add:

###> angle/file-storage-bundle ###
ANGLE_FILE_STORAGE_TYPE="local"
ANGLE_FILE_STORAGE_CONTAINER="container_or_path"
ANGLE_FILE_STORAGE_USERNAME="myusername"
ANGLE_FILE_STORAGE_SECRET="mysecret"
ANGLE_FILE_STORAGE_AWS_REGION=null
###< angle/file-storage-bundle ###

Local

angle_file_storage:
    type: local
    container: path/to/files
  • if path is absolute, it will be taken as is.
  • if path is relative, it will be created inside symfony/var/

Azure

angle_file_storage:
    type: azure_blob_storage
    container: azure_blob_container_name
    username: azure_account_name
    secret: azure_account_key

AWS

angle_file_storage:
    type: aws_s3
    container: aws_s3_bucket_name
    username: aws_s3_access_key
    secret: aws_s3_secret_access_key
    aws_region: aws_s3_bucket_region

统计信息

  • 总下载量: 48
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-04-19