2017 © Pedro Peláez
 

library upload

Upload client used by Zimbra Api

image

zimbra-api/upload

Upload client used by Zimbra Api

  • Monday, February 15, 2016
  • by nguyennv
  • Repository
  • 2 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Zimbra Upload

PHP wrapper library around the Zimbra upload service., (*1)

Requirement

  • PHP 8.1.x or later,
  • PSR Discovery library for searching installed http clients and http message factories,
  • (optional) PHPUnit to run tests,

Installation

Via Composer, (*2)

$ composer require zimbra-api/upload-api

or just add it to your composer.json file directly., (*3)

{
    "require": {
        "zimbra-api/upload-api": "*"
    }
}

This package using PSR-17: HTTP Factories, PSR-18: HTTP Client for creating multipart stream & sending HTTP requests to Zimbra upload service. Make sure to install package(s) providing "http client implementation" & "http factory implementation". The recommended package is Guzzle which provide both PSR-17 & PSR-18., (*4)

$ composer require guzzlehttp/guzzle

Basic usage of zimbra upload client

<?php

require_once 'vendor/autoload.php';

use Zimbra\Upload\Client;
use Zimbra\Upload\Request;

$file = new \SplFileInfo($filePath);
$request = new Request([$file], $requestId, $authToken);
$client = new Client('https://zimbra.server/service/upload');
$attachments = $client->upload($request);

$authToken is user authentication token, it can obtain from zimbra soap api., (*5)

<?php

require_once 'vendor/autoload.php';

use Zimbra\Account\AccountApi;

$api = new AccountApi('https://zimbra.server/service/soap');
$auth = $api->authByName('username', 'password');
$authToken = $auth->getAuthToken();

Licensing

BSD 3-Clause, (*6)

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.

The Versions

15/02 2016

dev-master

9999999-dev https://github.com/zimbra-api

Upload client used by Zimbra Api

  Sources   Download

BSD (3-Clause) License

The Requires

 

The Development Requires

upload

15/02 2016

1.0.0

1.0.0.0 https://github.com/zimbra-api

Upload client used by Zimbra Api

  Sources   Download

BSD (3-Clause) License

The Requires

 

The Development Requires

upload