siestacat / upload-api-client-bundle
1.0.4
2024-01-04 12:36 UTC
Requires
- php: ^8.1
- siestacat/upload-api-client: ^1.0
- symfony/config: ^6.3 || ^7.0
- symfony/dependency-injection: ^6.3 || ^7.0
- symfony/http-kernel: ^6.0 || ^7.0
- symfony/yaml: 6.*
README
为 https://github.com/SiestaCat/php-upload-api-client 库提供的 Symfony 扩展包
安装
composer require siestacat/upload-api-client-bundle
用法
use Siestacat\PhpUploadApiClient\Client;
$upload_token = $client->request();
//<<Here the client upload the files from browser>>
//Get the uploaded files:
// Siestacat\PhpUploadApiClient\File[]
$files = $client->getFiles($upload_token);
//Download single file. Get the tmp path of downloaded file:
$downloaded_file = $client->download($upload_token, $file[0]->hash);
测试
git clone https://github.com/SiestaCat/php-upload-api-client-bundle.git
cd php-upload-api-client-bundle
composer install
composer run-script test