ferguson/yii2-upload
Composer 安装命令:
composer require ferguson/yii2-upload
包简介
upload a file from local to remote server, a widget based on yii2.
README 文档
README
This is a uploaded library with plupload used to upload file.
NOTE: This extension depends on the yiisoft/yii2 extension. Check the composer.json for this extension's requirements and dependencies. PHP environment require
fileinfo, if upload files is a imageimagickorgdrequired.imagickis recommend and be priority of use
Why this extension
To ensure upload large files on most browsers, but in addition to plupload, all other plug-ins in use there is a little problem, such as uploadify
Installation
The preferred way to install this extension is through composer.
Note: Read this web tip /wiki on setting the
minimum-stabilitysettings for your application's composer.json.
Either run
$ php composer.phar require ferguson/yii2-upload "dev-master"
or add
"ferguson/yii2-upload": "dev-master"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply modify your application configuration as follows:
return [ 'modules' => [ 'upload' => [ 'class' => \ferguson\upload\Module::className(), 'storage' => 'file', // which storage used, default `file` means file will be upload on server. other storages could be supported soon. 'params' => [ 'dir' => '@webroot', // file upload directory, default `@webroot`, you can customer. 'url' => '@web', // file uploaded host, default `@web`, you can customer. 'resize' => [ 'width' => '90', 'height' => '120', ], // thumb images size. 'watermark' => [ 'type' => ['font', 'image'], //null|string|array, which water type, single or both or none. 'position' => '', //font water setting. 'font' => [ 'ttf' => '', 'text' => '',//string, water text. 'size' => '10',// font size, default 10px ], //image water setting. 'image' => [ 'src' => '', //string, water image path, absolute path. 'size' => '' ], ], ], ], //... ], //... ];
use in view pages.
use ferguson\upload\Upload; //Normal with ActiveForm & model echo $form->field($model, 'logo')->widget(Upload::className(), [ 'clientOptions' => [ 'type' => Upload::TYPE_IMAGE, 'max_size' => '2mb', ] ]);
License
yii2-upload is released under the MIT License. See the bundled LICENSE.md for details.
ferguson/yii2-upload 适用场景与选型建议
ferguson/yii2-upload 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 04 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「file」 「jquery」 「HTML5」 「upload」 「input」 「plupload」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ferguson/yii2-upload 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ferguson/yii2-upload 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ferguson/yii2-upload 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
HTML5 support for SilverStripe
The file manager intended for using Laravel with CKEditor / TinyMCE / Colorbox
HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites.
Yii2 LightBox image galary widget uses Lightbox v2.10.0 by Lokesh Dhakar
The yii2-videojs-widget is a Yii 2 wrapper for the [video.js](http://www.videojs.com/). A JavaScript and CSS library that makes it easier to work with and build on HTML5 video. This is also known as an HTML5 Video Player.
This is a laravel 4 package for the server and client side of datatables at http://datatables.net/
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 25
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-04-15