承接 waldemarnt/media 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

waldemarnt/media

Composer 安装命令:

composer require waldemarnt/media

包简介

Multi upload plugin

README 文档

README

This is a multiupload plugin to cakephp.

Install

install via composer: reference: waldemarnt/media

install manual:

copy to app/Plugin folder and run composer update comand to download WideImage

create table

CREATE TABLE media ( id int(11) NOT NULL AUTO_INCREMENT, path varchar(255) NOT NULL, name varchar(255) NOT NULL, model_name varchar(255) NOT NULL, model_id int(11) NOT NULL, size int(11) DEFAULT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;

Using

First you need load into your bootstrap.php file;

CakePlugin::load('Media');

Now you need add this parameter into your Model;

public $actsAs = array(
	'Media.Media'=>array(
		'thumb_size'=>array(
			'width'=>100,
			'height'=>100
			)
		)
	);

You need add public $helpers = array("Media.Media"); to your controller or app controller, to use Media plugin file upload helper.

Now in your view you need this field

Media->file(); ?>

To show uplaoded files you need in your view

Element('Media.show'); ?>

Now it's works fine :D

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固