function UploadedFileInterface::getError

Same name in other branches
  1. 10 core/modules/file/src/Upload/UploadedFileInterface.php \Drupal\file\Upload\UploadedFileInterface::getError()

Returns the upload error code.

If the upload was successful, the constant UPLOAD_ERR_OK is returned. Otherwise, one of the other UPLOAD_ERR_XXX constants is returned.

Return value

int The upload error code.

1 method overrides UploadedFileInterface::getError()
FormUploadedFile::getError in core/modules/file/src/Upload/FormUploadedFile.php
Returns the upload error code.

File

core/modules/file/src/Upload/UploadedFileInterface.php, line 46

Class

UploadedFileInterface
Provides an interface for uploaded files.

Namespace

Drupal\file\Upload

Code

public function getError() : int;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.