mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Co-authored-by: Aditya Tripathi <aditya@climactic.co>
20 lines
540 B
PHP
20 lines
540 B
PHP
<?php
|
|
|
|
namespace App\Support;
|
|
|
|
use League\Flysystem\UnableToReadFile;
|
|
|
|
/**
|
|
* A storage adapter that writes a file straight to a stream, so a download through Coolify buffers nothing.
|
|
*/
|
|
interface StreamsDownloads
|
|
{
|
|
/**
|
|
* @param resource $destination
|
|
* @param int $maxBytes The download never writes more than this. FTPS and WebDAV fail when the server sends more; SFTP reads only this much.
|
|
*
|
|
* @throws UnableToReadFile
|
|
*/
|
|
public function download(string $path, $destination, int $maxBytes): void;
|
|
}
|