You are here

public function UploadedFileInterface::getClientMediaType in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/psr/http-message/src/UploadedFileInterface.php \Psr\Http\Message\UploadedFileInterface::getClientMediaType()

Retrieve the media type sent by the client.

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

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

Return value

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

2 methods override UploadedFileInterface::getClientMediaType()
UploadedFile::getClientMediaType in vendor/zendframework/zend-diactoros/src/UploadedFile.php
Retrieve the media type sent by the client.
UploadedFile::getClientMediaType in vendor/symfony/psr-http-message-bridge/Tests/Fixtures/UploadedFile.php
Retrieve the media type sent by the client.

File

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

Class

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

Namespace

Psr\Http\Message

Code

public function getClientMediaType();