You are here

protected static function DataProviderFile::isUploadedFile in RESTful 7.2

Helper function that checks if a file was uploaded via a POST request.

Parameters

string $filename: The name of the file.

Return value

bool TRUE if the file is uploaded. FALSE otherwise.

1 method overrides DataProviderFile::isUploadedFile()
DataProviderFileTest::isUploadedFile in tests/modules/restful_test/src/Plugin/resource/DataProvider/DataProviderFileTest.php
Helper function that checks if a file was uploaded via a POST request.

File

src/Plugin/resource/DataProvider/DataProviderFile.php, line 316
Contains \Drupal\restful\Plugin\resource\DataProvider\DataProviderFile.

Class

DataProviderFile
Class DataProviderFile.

Namespace

Drupal\restful\Plugin\resource\DataProvider

Code

protected static function isUploadedFile($filename) {
  return is_uploaded_file($filename);
}