dreamfactory/df-filemanager-app
Composer 安装命令:
composer require dreamfactory/df-filemanager-app
包简介
DreamFactory(tm) File Manager
README 文档
README
Standalone File Manager application for DreamFactory file services based on this.
Overview
DreamFactory is a secure, self-hosted enterprise data access platform that provides governed API access to any data source, connecting enterprise applications and on-prem LLMs with role-based access and identity passthrough.
This app runs in an iframe inside the Files tab of the admin app or, when opened from LaunchPad, in a new browser tab. In LaunchPad the File Manager can be selected from the list of available apps. File Manager is always part of the default DreamFactory installation, accessed from /filemanager/index.html.
The purpose of the app is to display a list of available file storage services, allowing the user to navigate the folders. You can create or delete files and folders. You can download files, and it also includes the ACE editor for editing text files.
Here is how it gets launched from the Files tab of the admin app:
$( "#root-file-manager iframe" ).attr( "src", INSTANCE_BASE_URL + '/filemanager/index.html?path=/&allowroot=true').show();
From LaunchPad, the file manager is launched using the app URL:
$window.open(app.url);
This opens a new browser tab.
The app starts by loading the file services and displaying them as the top level list. This mode is triggered by the allowroot=true query param. If you select a file service from the list then it queries the selected service as you navigate through the folders for that service. There used to be a mode where it would show only the files and folders for a single service and allowroot would be set to false. This mode is no longer used.
If you are in the admin app and click the Files tab, you want to launch the File Manager in an iframe and have it pick up the session previously established by the admin app. It first checks for session_token as an explicit query param, then checks for a cookie named 'CurrentUserObj' in window.parent. The Files tab is the parent of the File Manager iframe. 'CurrentUserObj' is the name of the cookie stored by the admin app when a user logs in. If you are in LaunchPad the file manager gets launched in new window, and it looks for the cookie in window.opener. In either case, if that cookie exists it grabs the session_token out of the session info. This token will be used in subsequent API calls made by the file manager, along with the hardcoded API key.
Build Process
The structure and deployment of this app is not very good. The code is all under /js and there is no build process in place like there is for the admin app and API docs app. In other words there is no 'app' or 'dist' version. You are just editing and running the code under /js as is.
Release Process
Use git flow to do releases. This will merge all changes from develop branch into master with a tag. Let's say you are going from 0.3.0 to 0.4.0.
git flow release start 0.4.0
To do a release of the File Manager you need to bump the version number in composer.json. The next version would be 0.4.x-dev.
"extra": {
"branch-alias": {
"dev-develop": "0.4.x-dev"
},
"installer-name": "filemanager"
}
git add --all
git commit -m "Release 0.4.0"
git flow release finish 0.4.0
git push origin develop
git checkout master
git push origin master
git push --tags
Adding new file storage service types
If you add a new type of file storage service to DreamFactory, those services will show up in File Manager without requiring any changes. When it queries the list of services it looks for all services where group is set to 'File'. Note that for non-admin users /api/v2 will only return services that your role grants access to.
url: CurrentServer + '/api/v2?group=File'
dreamfactory/df-filemanager-app 适用场景与选型建议
dreamfactory/df-filemanager-app 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 37k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2016 年 02 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「rest」 「api」 「file manager」 「dreamfactory」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dreamfactory/df-filemanager-app 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dreamfactory/df-filemanager-app 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dreamfactory/df-filemanager-app 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox
A PSR-7 compatible library for making CRUD API endpoints
Api bundle
Laravel Media Popup to upload/view the files
PMVC Plugin for File information
Mapper for accessing resources in KWCMS
统计信息
- 总下载量: 37k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2016-02-11