codebridge / transfersh
Easy interaction with the transfer.sh API
1.1
2016-03-29 19:30 UTC
Requires
- php: >=5.5.0
- guzzlehttp/guzzle: ^6.1
- splitbrain/php-archive: ^1.0
This package is not auto-updated.
Last update: 2025-01-04 20:52:31 UTC
README
Installation
composer require codebridge/transfersh
Code Example
use CodeBridge\Transfer;
$transfer_client = new Transfer();
$file_path = realpath('./whatever.ext');
$download_url = $transfer_client->send($file_path);
Multiple files
use CodeBridge\Transfer;
$transfer_client = new Transfer();
$file_paths = ['./whatever.ext','./whatever2.ext'];
$download_url = $transfer_client->send($file_paths,'custom_zip_name'); //Returns custom_zip_name.zip
More complex example (for self hosted installations)
use CodeBridge\Transfer;
$transfer_client = new Transfer('http', 'yourdomain.com');
$file_path = realpath('./whatever.ext');
$download_url = $transfer_client->send($file_path, 'somecustomname.ext');