greendot/image-puller-client

从Greendot管理员拉取图片的客户端包

安装: 243

依赖项: 0

建议者: 0

安全: 0

星星: 0

关注者: 1

分支: 1

开放问题: 0

类型:symfony-bundle

v1.1.1 2023-04-12 10:09 UTC

This package is auto-updated.

Last update: 2024-09-12 13:09:14 UTC


README

请确保已全局安装Composer,具体请参阅Composer文档中的安装章节

步骤 1:下载包

打开命令行,进入项目目录,执行以下命令以下载此包的最新稳定版本

$ composer require greendot/image-puller-client

步骤 2:启用包

然后,将包添加到项目config/bundles.php文件中已注册的包列表中,以启用该包

// config/bundles.php

return [
    // ...
    Greendot\ImagePullerClient\ImagePullerClientBundle::class => ['all' => true],
];

步骤 3:创建配置文件

config/packages/image-puller-client.yaml中创建配置文件

image_puller_client:
  jwt_user: <USER ID>
  jwt_pass: <SECRET>
  src:      <DIR where images are going to be saved>
  endpoint: <URL ENDPOINT>

步骤 4:允许第三方路由

config/routes/image-puller-client.yaml中创建配置文件

image_puller_client:
    resource: '@ImagePullerClientBundle/Resources/config/routes.yaml'

请求格式

form-data格式发送图片,并在头部设置jwt-token