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

Breadcrumb

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

function UploadedFileInterface::getClientFilename

Retrieve the filename sent by the client.

Do not trust the value returned by this method. A client could send a malicious filename with the intention to corrupt or hack your application.

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

Return value

string|null The filename sent by the client or null if none was provided.

1 method overrides UploadedFileInterface::getClientFilename()
UploadedFile::getClientFilename in vendor/guzzlehttp/psr7/src/UploadedFile.php
Retrieve the filename sent by the client.

File

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

Class

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

Namespace

Psr\Http\Message

Code

public function getClientFilename() : ?string;

API Navigation

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