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

Breadcrumb

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

function UploadedFileInterface::getSize

Same name in this branch
  1. 11.1.x core/modules/file/src/Upload/UploadedFileInterface.php \Drupal\file\Upload\UploadedFileInterface::getSize()

Retrieve the file size.

Implementations SHOULD return the value stored in the "size" key of the file in the $_FILES array if available, as PHP calculates this based on the actual size transmitted.

Return value

int|null The file size in bytes or null if unknown.

1 method overrides UploadedFileInterface::getSize()
UploadedFile::getSize in vendor/guzzlehttp/psr7/src/UploadedFile.php
Retrieve the file size.

File

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

Class

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

Namespace

Psr\Http\Message

Code

public function getSize() : ?int;

API Navigation

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