Skip to content
Snippets Groups Projects
Select Git revision
  • 11.x
  • 11.2.x protected
  • 10.5.x protected
  • 10.6.x protected
  • 11.1.x protected
  • 10.4.x protected
  • 11.0.x protected
  • 10.3.x protected
  • 7.x protected
  • 10.2.x protected
  • 10.1.x protected
  • 9.5.x protected
  • 10.0.x protected
  • 9.4.x protected
  • 9.3.x protected
  • 9.2.x protected
  • 9.1.x protected
  • 8.9.x protected
  • 9.0.x protected
  • 8.8.x protected
  • 10.5.2 protected
  • 11.2.3 protected
  • 10.5.1 protected
  • 11.2.2 protected
  • 11.2.1 protected
  • 11.2.0 protected
  • 10.5.0 protected
  • 11.2.0-rc2 protected
  • 10.5.0-rc1 protected
  • 11.2.0-rc1 protected
  • 10.4.8 protected
  • 11.1.8 protected
  • 10.5.0-beta1 protected
  • 11.2.0-beta1 protected
  • 11.2.0-alpha1 protected
  • 10.4.7 protected
  • 11.1.7 protected
  • 10.4.6 protected
  • 11.1.6 protected
  • 10.3.14 protected
40 results

InputStreamFileWriterInterface.php

Blame
  • Lee Rowlands's avatar
    Issue #3380345 by kim.pepper, smustgrave, quietone, larowlan: Create a...
    Lee Rowlands authored
    Issue #3380345 by kim.pepper, smustgrave, quietone, larowlan: Create a InputStreamFileWriter for writing the input stream to a file
    4d6f38f6
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    InputStreamFileWriterInterface.php 744 B
    <?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;
    
    }