cgm/zf2-file-upload-examples
Composer 安装命令:
composer require cgm/zf2-file-upload-examples
包简介
Form file upload examples for Zend Framework 2
README 文档
README
A set of form file upload examples to test the new features in the upcoming ZF 2.1 release.
NOTE: These examples are only compatible with Zend Framework version 2.1 (or greater).
You can find a good primer on file uploading in the documentation.
List of Examples
- Using a single File element.
- Using multiple File elements in a Collection.
- Using a single File element with the HTML5 "multiple" attribute.
- Temporarily save uploaded file(s) until a form is completely valid.
- Using file uploads with the Post-Redirect-Get plugin.
- Using AJAX to upload files and displaying progress with Session Upload Progress (Requires PHP 5.4).
- Complex example using Session Upload Progress with a partially valid form (Requires PHP 5.4).
See the Example Controllers for more details.
If there is a use-case for file uploading that you'd like to see and isn't currently included here, please create a GitHub issue.
Installation
- Install the ZendSkeletonApplication.
- Clone this project into your
./vendor/directory (or use composer, see below). - Enable
ZF2FileUploadExamplesin yourapplication.config.phpfile. - Create a
./data/tmpuploadsdirectory, and make writeable by the webserver. - Download the jQuery Form plugin into
./public/js/jquery.form.js(for the Upload Progress example). - Navigate to
/file-upload-examplesin your browser to see the list of examples.
You may also need to change/verify these php.ini settings:
file_uploads = On post_max_size = 50M upload_max_filesize = 50M session.upload_progress.enabled = On session.upload_progress.freq = "1%" session.upload_progress.min_freq = "1" ; Also make certain 'upload_tmp_dir' is writeable
Composer
{
"require": {
"cgm/zf2-file-upload-examples": ">=1.0.0"
}
}
cgm/zf2-file-upload-examples 适用场景与选型建议
cgm/zf2-file-upload-examples 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.26k 次下载、GitHub Stars 达 79, 最近一次更新时间为 2012 年 12 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 cgm/zf2-file-upload-examples 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cgm/zf2-file-upload-examples 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 5.26k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 80
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2012-12-11