Library for tus server
PHP Shell
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/ZfTusServer
test
.gitignore
LICENSE
README.md
composer.json

README.md

Zend Framework 2 Tus Server

Library for tus server (tus protocol 1.0)

Installation

use composer

Server Usage

/**
 * Zend Framework action for uploading files
 */
public function uploadAction() {
  // Create and configure server
  $debug = false;
  $server = new \ZfTusServer\Server('/path/to/save/file', 
                           $this->getRequest(),
                           $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 :

RewriteEngine on

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

Author

Jaroslaw Wasilewski orajo@windowslive.com.

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

License

MIT