定制 vysokeskoly/image-api-sdk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

vysokeskoly/image-api-sdk

最新稳定版本:3.3.0

Composer 安装命令:

composer require vysokeskoly/image-api-sdk

包简介

SDK for Image Api

README 文档

README

Latest Stable Version License Checks Build Coverage Status

Sdk for ImageApi

Installation

{
    "vysokeskoly/image-api-sdk": "^3.0"
}

Requirements

  • PHP 8.1
  • Corresponding version of ImageApi

Usage

In Symfony application

services:
    _defaults:
        autowire: true      # Automatically injects dependencies in your services.
        autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.

    VysokeSkoly\ImageApi\Sdk\ImageUploaderInterface: '@VysokeSkoly\ImageApi\Sdk\ImageApiUploader'

    VysokeSkoly\ImageApi\Sdk\Service\ApiProvider:
        $apiUrl: '%image_api_url%'
        $apiKey: '%image_api_key%'
        $namespace: '%image_api_namespace%'

    VysokeSkoly\ImageApi\Sdk\Service\CommandQueryFactory: ~

    VysokeSkoly\ImageApi\Sdk\ImageApiUploader:
        arguments:
            $allowedMimeTypes:
                GIF: 'image/gif'
                JPEG: 'image/jpeg'
                PNG: 'image/png'
            $imageMaxFileSize: 8536064 # 8 * 1024 * 124 = 8 MB
            $imageMaxSize: 2048
        calls:
            - [ enableCache ]

    # optional
    VysokeSkoly\ImageApi\Sdk\Service\SavedImageDecoder:
        arguments:
            $imageBaseUrl: '%image_api_url%'
        tags:
            - { name: lmc_cqrs.response_decoder, priority: 55 }

NOTE: If you need size information about just Saved images, you need to enable Image Cache for a decoder.

\VysokeSkoly\ImageApi\Sdk\Service\ImagesCache::enable();

or in services declaration

    VysokeSkoly\ImageApi\Sdk\ImageApiUploader:
        ...
        calls:
            - [ enableCache ]

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-25