
| Current Path : /var/www/html/rocksensor/web/core/modules/file/src/Upload/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor/web/core/modules/file/src/Upload/InputStreamFileWriterInterface.php |
<?php
namespace Drupal\file\Upload;
/**
* Uploads files from a stream.
*/
interface InputStreamFileWriterInterface {
/**
* The length of bytes to read in each iteration when streaming file data.
*/
const DEFAULT_BYTES_TO_READ = 8192;
/**
* The default stream.
*/
const DEFAULT_STREAM = "php://input";
/**
* Write the input stream to a temporary file.
*
* @param string $stream
* (optional) The input stream.
* @param int $bytesToRead
* (optional) The length of bytes to read in each iteration.
*
* @return string
* The temporary file path.
*/
public function writeStreamToFile(string $stream = self::DEFAULT_STREAM, int $bytesToRead = self::DEFAULT_BYTES_TO_READ): string;
}