2017 © Pedro Peláez
 

library ng-upload-chunked

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

image

hgouveia/ng-upload-chunked

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

  • Wednesday, June 6, 2018
  • by hgouveia
  • Repository
  • 1 Watchers
  • 1 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 56 % Grown

The README.md

Ng Upload Chunked

Packagist Version Build Status HHVM Build Status Windows Build Status, (*1)

Php implementation of the file chunked upload for the angular directive ng-file-upload, (*2)

Note: it could work for any html5 uploader with chunked upload if NgFileChunk is constructed properly, (*3)

Install

Clone or download this repo, see the example, (*4)

With Composer, (*5)

$ composer require hgouveia/ng-upload-chunked

Example of Usage

API doc, (*6)

Check complete usage in the example folder, (*7)

<?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, (*8)

$ npm test

License

Read License for more licensing information., (*9)

Contributing

Read here for more information., (*10)

The Versions

06/06 2018

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Jose De Gouveia

php upload chunked ng-file-upload

06/06 2018

v1.0.6

1.0.6.0

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

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Jose De Gouveia

php upload chunked ng-file-upload

30/05 2018

v1.0.5

1.0.5.0

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

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Jose De Gouveia

php upload chunked ng-file-upload

09/05 2018

v1.0.4

1.0.4.0

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

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Jose De Gouveia

php upload chunked ng-file-upload

08/05 2018

v1.0.3

1.0.3.0

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

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Jose De Gouveia

php upload chunked ng-file-upload

08/05 2018

v1.0.2

1.0.2.0

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

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Jose De Gouveia

php upload chunked ng-file-upload

07/05 2018

v1.0.1

1.0.1.0

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

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Jose De Gouveia

php upload chunked ng-file-upload

21/02 2018

v1.0.0

1.0.0.0

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

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Jose De Gouveia

php upload chunked ng-file-upload