Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UploadedFileInterface.php

function UploadedFileInterface::getError

Retrieve the error associated with the uploaded file.

The return value MUST be one of PHP's UPLOAD_ERR_XXX constants.

If the file was uploaded successfully, this method MUST return UPLOAD_ERR_OK.

Implementations SHOULD return the value stored in the "error" key of the file in the $_FILES array.

Return value

int One of PHP's UPLOAD_ERR_XXX constants.

See also

http://php.net/manual/en/features.file-upload.errors.php

1 method overrides UploadedFileInterface::getError()
UploadedFile::getError in vendor/guzzlehttp/psr7/src/UploadedFile.php
Retrieve the error associated with the uploaded file.

File

vendor/psr/http-message/src/UploadedFileInterface.php, line 92

Class

UploadedFileInterface
Value object representing a file uploaded through an HTTP request.

Namespace

Psr\Http\Message

Code

public function getError() : int;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal