2017 © Pedro Peláez
 

library zf2-tus-server

Zend Framework 2 (PHP) library for tus server, based on php-tus library by Simon Leblanc.

image

orajo/zf2-tus-server

Zend Framework 2 (PHP) library for tus server, based on php-tus library by Simon Leblanc.

  • Monday, November 20, 2017
  • by Orajo
  • Repository
  • 1 Watchers
  • 3 Stars
  • 297 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 4 Versions
  • 18 % Grown

The README.md

Laminas Tus Server

Library for tus server (tus protocol 1.0), (*1)

Installation

use composer, (*2)

Server Usage

This libbrary depends on Flysystem, (*3)

/**
 * Laminas action for uploading files
 */
public function uploadAction() {
     // Create and configure server
    $debug = false;
    // The internal adapter
    $adapter = new League\Flysystem\Local\LocalFilesystemAdapter(
        __DIR__.'/storage/'
    );

    // The FilesystemOperator
    $filesystem = new League\Flysystem\Filesystem($adapter);

    $server = new \ZfTusServer\Server('/path/to/save/file', 
                           $this->getRequest(),
                           $adapter
                           $debug
    );

    // Run server
    $server->process(true);
}

If you are with an Apache server, add an .htaccess file to redirect all request in the php page (without that, your PATCH call failed), like :, (*4)

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]

Author

Jaroslaw Wasilewski orajo@windowslive.com., (*5)

This library is based on library (https://github.com/leblanc-simon/php-tus) by Simon Leblanc contact@leblanc-simon.eu., (*6)

License

MIT, (*7)

The Versions

20/11 2017

dev-master

9999999-dev https://github.com/Orajo/zf2-tus-server

Zend Framework 2 (PHP) library for tus server, based on php-tus library by Simon Leblanc.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jaroslaw Wasilewski

upload tus

20/11 2017

v1.2.0

1.2.0.0 https://github.com/Orajo/zf2-tus-server

Zend Framework 2 (PHP) library for tus server, based on php-tus library by Simon Leblanc.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jaroslaw Wasilewski

upload tus

05/05 2017

v1.1.0

1.1.0.0 https://github.com/Orajo/zf2-tus-server

Zend Framework 2 (PHP) library for tus server, based on php-tus library by Simon Leblanc.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jaroslaw Wasilewski

upload tus

14/03 2017

v1.0.0

1.0.0.0 https://github.com/Orajo/zf2-tus-server

Zend Framework 2 (PHP) library for tus server, based on php-tus library by Simon Leblanc.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jaroslaw Wasilewski

upload tus