skylineos/yii2-s3manager
Composer 安装命令:
composer require skylineos/yii2-s3manager
包简介
A yii2 extension for managing files in AWS S3 buckets
README 文档
README
A Yii 2 extension for managing files in AWS S3 buckets
This extension provides a very customizable method for managing files in AWS S3 buckets for the Yii framework 2.0. It can function on it's own, as a callback for a form field, or integrated with TinyMCE.
For license information check the LICENSE-file.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist skylineos/yii2-s3manager
or add
"skylineos/yii2-s3manager": "~3.0.0"
to the require section of your composer.json.
Configuration
To use this extension, you should add the module to your web configuration. Configuration of the module itself can be done here or on the fly.
return [ //.... 'modules' => [ 's3manager' => [ 'class' => 'skylineos\yii\s3manager\Module', // All settings can be configured on the fly regardless of usage type (fileinput, standalone manager, tinymce plugin) 'configuration' => [ 'bucket' => 'your-bucket-name', // can be overriden with \Yii::$app->params['s3bucket'] 'version' => 'latest', 'region' => 'your-bucket-region', // can be overriden with \Yii::$app->params['s3region'] 'scheme' => 'http', ], ], ] ];
Be certain to check the widgets folder for exposed parameters.
Use
Standalone
Simply navigate to /s3manager
With a file input (active form)
In your form, add the following (ie. views/post/form.php)
use skylineos\yii\s3manager\widgets\{FileInput, MediaManagerModal};
Wherever you want your form field:
<label>My Field</label> <?= FileInput::widget(['model' => $model, 'attribute' => 'myField']) ?>
Then, at the bottom of the page (after your <?php ActiveForm::end(); ?>)
<?= MediaManagerModal::widget(['s3region' => 'us-east1', 's3bucket' => 'my-bucket-name']) ?>
With TinyMCE
On your form.php
use skylineos\yii\s3manager\widgets\{TinyMce, MediaManagerModal};
Wherever you want your TinyMCE (client options are largely up to you):
<?= $form->field($model, 'content')->widget(TinyMce::className(), [ 'options' => ['rows' => 15], 'clientOptions' => [ 'plugins' => [ "advlist autolink lists link charmap print preview anchor", "searchreplace visualblocks code fullscreen", "insertdatetime media table contextmenu paste image" ], 'menubar' => 'edit insert view format table tools help', 'toolbar' => "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image" ] ]);?>
Then, at the bottom of the page (after your <?php ActiveForm::end(); ?>)
<?= MediaManagerModal::widget(['s3region' => 'us-east1', 's3bucket' => 'my-bucket-name']) ?>
skylineos/yii2-s3manager 适用场景与选型建议
skylineos/yii2-s3manager 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 278 次下载、GitHub Stars 达 2, 最近一次更新时间为 2021 年 05 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「s3」 「file manager」 「aws」 「widget」 「image manager」 「yii2」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 skylineos/yii2-s3manager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 skylineos/yii2-s3manager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 skylineos/yii2-s3manager 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox
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.
Elastic Driver for Laravel Scout
simple api library.
A replica of the AWS Elastic Beanstalk worker SQS daemon (sqsd) in PHP
Laravel Media Popup to upload/view the files
统计信息
- 总下载量: 278
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2021-05-06