convergine/craft-sharebox
Composer 安装命令:
composer require convergine/craft-sharebox
包简介
ShareBox allows to share files hosted on Azure Blob Storage or Amazon S3 with your site visitors.
关键字:
README 文档
README
ShareBox is a file manager plugin for CraftCMS v4.x that allows to upload and share files from Azure Blob Storage or Amazon S3 with your site visitors on the frontend.
For the plugin to work, an Amazon S3 ( https://aws.amazon.com/s3/ ) or Azure Blob Storage ( https://azure.microsoft.com/en-us/products/storage/blobs ) account is required and an Azure Blob Storage API key must be created https://learn.microsoft.com/en-us/rest/api/storageservices/blob-service-rest-api.
Note: The plugin works only with the files and folders that will be created after connecting the plugin to your Azure/Amazon instance. It cannot display files or folders that already exist on your Azure/Amazon account. Only files / folders created through plugin will show up in directory view)
Features
- AWS Integration: Easily upload files to Amazon S3 and share them in a "directory-view" on your website frontend
- Microsoft Azure Integration: Easily upload files to Azure Blob Storage and share them in a "directory-view" on your website frontend
- Password protect the files directory view on the front page (optional)
- Google ReCaptcha integration for the directory view
- Simple download statistics
Requirements
- Azure Blob Storage or Amazon S3 account is rewquired for this plugin to work
- Craft CMS 4.0.0 or later
- PHP 8.0.2 or later
Installation
- You can install this plugin from the Plugin Store or with Composer
# installation with composer # 1. go to the project directory cd /path/to/my-project # 2. tell Composer to load the plugin composer require convergine/craft-sharebox # 3. tell Craft to install the plugin ./craft plugin/install craft-sharebox
- Activate the plugin in the CraftCMS Control Panel (if it's not yet activated)
- Edit your .env file and add the following variables:
# for Azure Blob Storage
SHAREBOX_PROVIDER=AZUREBLOB
# edit the following variables with your own values
AZURE_BLOB_STORAGE_KEY1=your_key
AZURE_BLOB_STORAGE_ACCOUNT_NAME=accountname
AZURE_CONTAINER=container
or
# for Amazon S3
SHAREBOX_PROVIDER=AMAZONS3
# edit the following variables with your own values
AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_REGION=ca-central-1
AWS_BUCKET=your_bucket
- Configure the settings in plugin menu in the CraftCMS Control Panel
Go to ShareBox settings and enter the full URL of the page where you are going to display the file sharing
e.g. https://www.yourdomain.com/files-directory
- Adjust the twig template to display ShareBox:
# register the asset bundle (somewhere at the top of the file)
{% do view.registerAssetBundle("convergine\\sharebox\\assets\\FilesAssets") %}
# add the following code where you want the directory to show up
{% set files = craft.azurefiles.files%}
{{ files|raw }}
- Now you are ready to proceed with uploading files through the plugin interface in the CraftCMS Control Panel.
Note: If you decide to switch between Azure/Amazon after you've already created folders and uploaded files through the plugin interface, you will need to re-upload everything through plugin again, after the provider switch, as the plugin will see new provider's container as completely empty.
Customizing Design
At the moment, the only way to adjust the design of the frontend directory view is to either add the same styles that are used in Sharebox' frontend.css with !important attribute, or to add adjusted styles within your template where Sharebox' twig code is placed.
Editing the styles directly in plugin files will result in overwritten changed upon update of the plugin.
Support
For any issues or questions, you can reach us by email info@convergine.com or by opening an issue on GitHub.
Roadmap
- Support for local file storage
- Improved statistics
Screenshots
convergine/craft-sharebox 适用场景与选型建议
convergine/craft-sharebox 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 28 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 05 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cms」 「amazon S3」 「cloud storage」 「Craft」 「craftcms」 「craft-plugin」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 convergine/craft-sharebox 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 convergine/craft-sharebox 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 convergine/craft-sharebox 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A SDK for working with B2 cloud storage.
Small library to access Microsoft Windows Azure Blob Storage with a Service or a StreamWrapper.
GraphQL authentication for your headless Craft CMS applications.
This package includes a script and fail2ban configuration that allows you to use fail2ban when utilizing AWS elastic load balancer (ELB) and an apache webserver.
Set Links with a specific language parameter
UCloud Resource (Cloud) Storage SDK for PHP
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2023-05-05





