承接 hypejunction/hypedropzone 相关项目开发

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

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

hypejunction/hypedropzone

最新稳定版本:6.1.1

Composer 安装命令:

composer require hypejunction/hypedropzone

包简介

Drag-n-drop file uploads for Elgg

README 文档

README

Elgg 3.0

Drag&Drop File Uploads for Elgg

Features

  • Cross-browser support for drag&drop file uploads
  • Easy to integrate into existing forms
  • Supports chunked uploads of large files

Dropzone

Developer Notes

Adding a drag&drop file input and processing uploads

To add a drag&drop input to your form, add the following:

echo elgg_view('input/dropzone', array(
		'name' => 'upload_guids',
		'accept' => "image/*",
		'max' => 25,
		'multiple' => true,
		'container_guid' => $container_guid, // optional file container
		'subtype' => $subtype, // subtype of the file entities to be created
		// see the view for more options
	));

In your action, you can retrieve uploaded files with get_input('upload_guids');

You also need to implement a fallback solution for when the browser does not support drag and drop. Check hypeJunction\DropzoneService for an example.

Initializing and resetting dropzone

You can instantiate and clear dropzone by triggering jQuery events on the containing form:

$('.elgg-form').trigger('initialize'); // will instantiate dropzone inputs contained within the form
$('.elgg-form').trigger('reset'); // will clear previews and hidden guid inputs

Acknowledgements / Credits

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2015-07-27