承接 hgouveia/ng-upload-chunked 相关项目开发

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

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

hgouveia/ng-upload-chunked

Composer 安装命令:

composer require hgouveia/ng-upload-chunked

包简介

Php implementation of the file chunked upload for the angular directive ng-file-upload

README 文档

README

Packagist Version Build Status HHVM Build Status Windows Build Status FOSSA Status

Php implementation of the file chunked upload for the angular directive ng-file-upload

Note: it could work for any html5 uploader with chunked upload if NgFileChunk is constructed properly

Install

Clone or download this repo, see the example

With Composer

$ composer require hgouveia/ng-upload-chunked

Example of Usage

API doc

Check complete usage in the example folder

<?php
// In your POST handler
/*
 $defaultConfig = [
        "ext" => ".part",
        "fileInputName" => "file",
        "directoryPermission" => 0755,
        "readChunkSize" => 1048576, // 1MB
        "uploadDirectory" => "",
        "tempDirectory" => "",
    ];
*/
$nguc = new \NGUC\NgUploadChunked(); //optional $config param

try {
    // Contains the information of the current chunk
    $chunk = new \NGUC\NgFileChunk(
        $_POST['_uniqueId'],
        $_FILES['file']['name'],
        $_POST['_chunkSize'],
        $_POST['_currentChunkSize'],
        $_POST['_chunkNumber'],
        $_POST['_totalSize'],
    );
    
    // this could be used instead, if ng-file-upload is beign used
    //$chunk = new \NGUC\NgFileChunk();
    //$chunk->populate($_POST['_uniqueId'], $_FILES['file']['name']);

    $nguc->process($chunk);

    // response the path when finished
    if ($nguc->isFinished()) {
        echo $nguc->getUploadPath();
    }

} catch (\NGUC\NGUCException $e) {
    echo "ERROR: " . $e->getCode() . " - " . $e->getMessage();
}

Test

$ ./vendor/bin/peridot test

or if npm is available

$ npm test

License

Read License for more licensing information.

FOSSA Status

Contributing

Read here for more information.

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-02-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固