fluidtheory/s3-filemanager
Composer 安装命令:
composer require fluidtheory/s3-filemanager
包简介
File Manager with S3 Intrgration and integrate with Trumbowyg Editor
README 文档
README
File Manager with S3 Intrgration and integrate with Trumbowyg Editor
Steps to Integarte File Manager with S3 Integration
- Run following command to install package:
composer require fluidtheory/s3-filemanager
- Add Publisher class in app.php of config folder
Fluidtheory\Filemanager\FileManagerServiceProvider::class
- After successful installation, to publish files to project you need to run,
php artisan vendor:publish
- Include File Manager css in header
<link rel="stylesheet" href="/css/filemanager-custom.css">
Note: Include Bootstrap css and js for modal style if not available in your project. Please include jquery file in header
- Include Modal in your view file where input and button are added
@include('filemanager::file-manager.iframe')
- Set following attribute for upload button,
1) data-multiple="true" for multi-select image or data-multiple="false" for single image select 2) Set another attribute data-click=""
- Add input field to set image value
<input type="text" class="form-control fm-image" name="new_images" value="" readonly>
- Pass folder name with hidden input in view file
<input type="hidden" id="folder-id" value="<your-folder-name>">
- Change default value of "FILESYSTEM_DRIVER" in filesystems.php file to s3 and add update s3 array as follwoing
'driver' => 's3', 'key' => env('AWS_KEY'), 'secret' => env('AWS_SECRET'), 'region' => env('AWS_REGION'), 'bucket' => env('AWS_BUCKET'), 'visibility' => 'public', 'url' => env('AWS_URL'),
- Final Step , Set following env variable in .env file with value
AWS_KEY= AWS_SECRET= AWS_REGION= AWS_BUCKET= VISIBILITY='public' AWS_BLOG_URL= AWS_URL=
If you want to include file manager in trumbowyg editor please include following:
Include following js file first, <script src="/js/file-manager/trumbowyg.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.15.1/plugins/emoji/trumbowyg.emoji.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.15.1/plugins/table/trumbowyg.table.min.js"></script>
- Also, include css of trumbowyg editor
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.15.1/ui/trumbowyg.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.15.1/plugins/emoji/ui/trumbowyg.emoji.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Trumbowyg/2.15.1/plugins/table/ui/trumbowyg.table.min.css">
- Final steps for Editor with s3-filemanager, give class to textarea to integrate Trumbowyg editor
$('.<your-class>').trumbowyg();
fluidtheory/s3-filemanager 适用场景与选型建议
fluidtheory/s3-filemanager 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 13.25k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 04 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 fluidtheory/s3-filemanager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 fluidtheory/s3-filemanager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 13.25k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-04-10