承接 sunlab/wn-forumupload-plugin 相关项目开发

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

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

sunlab/wn-forumupload-plugin

Composer 安装命令:

composer require sunlab/wn-forumupload-plugin

包简介

Adds file upload management for winter/wn-forum-plugin

README 文档

README

This plugin extends Winter.Forum to adds front-end user file upload capabilities to it.

It extends the Topic component to add a onFileUpload handler which:

  • store the uploaded files
  • attach them to the Post model

File upload Preview

Under development

This plugin is still under active development and should not be used in a production environment.

Installation

This plugin can be installed using composer:

composer require sunlab/wn-levelup-plugin

How to use it

The plugin doesn't provide any front end component, you need to customize yourself the way the file should be attached on the frontend side, you can use it with Dropzone.js, a richeditor or any custom implementation.

You can find here a custom implementation reproducing a GitHub-like mechanism (as shown above).

Basically: you need to trigger an AJAX call for the handler onFileUpload sending files (the input name doesn't matter). The handler will return server-side uploaded files' information containing:

    id => the File model id
    originalName => the uploaded original file name
    name => same as originalName without extension
    url => the server-side file's url

Settings

The plugin includes a Settings model to validate uploads, including:

  • The allowed file extensions
  • A max filesize limit
  • The amount of files per post

Todo:

  • Add a onFileDeletion handler to remove an attached file

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-12