public function PostFile::__construct

Parameters

string $fieldName Name of the field:

string $filename Path to the file:

string $contentType Content-Type of the upload:

File

drupal/core/vendor/guzzle/http/Guzzle/Http/Message/PostFile.php, line 22

Class

PostFile
POST file upload

Namespace

Guzzle\Http\Message

Code

public function __construct($fieldName, $filename, $contentType = null) {
  $this->fieldName = $fieldName;
  $this
    ->setFilename($filename);
  $this->contentType = $contentType ?: $this
    ->guessContentType();
}