承接 zimbra-api/upload-api 相关项目开发

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

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

zimbra-api/upload-api

最新稳定版本:3.0.0

Composer 安装命令:

composer require zimbra-api/upload-api

包简介

PHP wrapper library around the Zimbra upload service

README 文档

README

PHP wrapper library around the Zimbra upload service.

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

$ composer require zimbra-api/upload-api

or just add it to your composer.json file directly.

{
    "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.

$ 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.

<?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

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

统计信息

  • 总下载量: 38
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2022-08-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固