Download the PHP package githen/laravel-upload without Composer
On this page you can find all versions of the php package githen/laravel-upload. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package laravel-upload
laravel-upload
基于Dropzone为laravel提供上传支持
安装
配置文件说明
在config/filesystem.php
中添加目录public
配置项
生成upload.php
上传配置文件
初始化上传实例
自动发现功能将在6.0.0中删除,如果依赖此功能,需要手动关闭。默认生成的JS已处理,可忽略。
在html
中引入JS文件
进行实例化
参数 | 名称 | 说明 | 备注 | |
---|---|---|---|---|
dom | 实例化的DOM标识 | 必填 | ||
csrf | POST提交时的csrf验证 | 非必填 true |
false | |
acceptedFiles | 允许上传文件后缀(.jpg,.png) | 默认为.zip | ||
url | 上传地址 | {!! route('jiaoyu.upload',['param' => 'img', 'is_tmp'=>true]) !!} | param :标识(以此标识从upload.php 中获取配置信息)is_tmp :是否使用临时目录(tmp ),为false使用path 目录 |
|
paramName | 上传的属性名称 | 非必填,默认:file |
||
chunkSize | 分片大小 | 单位:MB,默认2MB | ||
maxFiles | 最多上传文件数 | 非必填,默认:1 | ||
maxFilesize | 文件最大限制 | 非必填,单位:MB,默认10MB, | ||
chunking | 是否分片 | |||
forceChunking | 上传时显示文件详情,不可修改 | |||
dictDefaultMessage | 默认提示语 | 拖动文件至此处或点击上传 | ||
dictMaxFilesExceeded | 超过限制上传数量提示语 | 您最多上传的文件数为 + maxFiles | ||
dictResponseError | 上传失败提示语 | 文件上传失败! | ||
dictInvalidFileType | 文件类型提示语 | 文件类型支持 | ||
dictFallbackMessage | 兼容性提示语 | 浏览器不支持 | ||
dictFileTooBig | 文件过大提示语 | 文件过大,最大支持 + maxFilesize + MB | ||
dictRemoveFile | 删除提示语 | 删除 | ||
addRemoveLinks | 添加删除连接 | |||
previewsContainer | 预览容器 | |||
previewTemplate | 预览生成模板 | |||
thumbnailWidth | 插件中,展示图宽度 | 默认:120 | ||
thumbnailHeight | 插件中,展示图高度 | 默认:120 |
临时目录迁移到正式目录
如果上传的文件是放在临时目录tmp
下,则在实际业务中,需要进行迁移文件到正式目录。可执行以下操作完成迁移操作。
删除文件
All versions of laravel-upload with dependencies
PHP Build Version
Package Version
The package githen/laravel-upload contains the following files
Loading the files please wait ....