承接 mehrdad-dadkhah/php-fine-uploader 相关项目开发

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

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

mehrdad-dadkhah/php-fine-uploader

Composer 安装命令:

composer require mehrdad-dadkhah/php-fine-uploader

包简介

upload chunks file. use to upload big files

README 文档

README

Software License Packagist Version Packagist

php lib for use fine-uploader js as client and upload big files with separate to chunks files. This libarary is base on chunks-uploader.

Installation

composer require mehrdad-dadkhah/php-fine-uploader

Usage

use MehrdadDadkhah\Video\FineUploader;

$uploaderService = new FineUploader();
$uploadResult = $uploaderService->setConfigs(
                'form-input-name',
                'path-to-chunks-folder'
            )
                ->setUniqueIdentifier('unique-identifier')
                ->setDomain('http://example.com') //to set cors header
                ->checkDublicateFile(function($uuid) { //closure function to check file is duplicate or not it should get $uuid as input and return boolean. uuid is a video unique hash
                	return false;
                })
                ->upload('path-to-upload-directory');

Custome file name

If want to set output file name try use setUploadName() function before fire finishUpload() function:

$uploadHandeler->setUploadName('my-name.mp4');

If don't set name your file name be with structur YYYY_m_d_hashname.mp4 and in final resutl generated name will be return.

Check and generate output directory

If want to script make output directory automatically just set it:

$uploadHandeler->checkAndGenerateOutputDirectory();

Temp directory

If want to generate file in a temp directory and then move to main upload directory you can use setTempDirectory() function:

$uploadHandeler->setTempDirectory('path-to-temp');

Max upload size

ChunksUploader calculate uploaded file size (sum of chunks) and compare with upload_max_filesize ini config. If want to stop bigger file at first request for better ux can pass total main file size in bytes:

$uploadHandeler->setVideoTotalSize(213456);

And can overwrite upload_max_filesize by:

$uploadHandeler->setMaxUploadSize(213456);

License

hls-video-generater is licensed under the GPLv3 License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPLv3
  • 更新时间: 2017-09-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固