You are here

public function AvatarKitDownloadUtilityInterface::createFile in Avatar Kit 8.2

Creates a file entity from a PSR response.

Parameters

\Psr\Http\Message\ResponseInterface $response: File to download.

string $default_filename: The desirable file name. Extension may be substituted.

Return value

\Drupal\file\FileInterface|null The new file entity, or null if the file could not be downloaded.

1 method overrides AvatarKitDownloadUtilityInterface::createFile()
AvatarKitDownloadUtility::createFile in src/AvatarKitDownloadUtility.php
Creates a file entity from a PSR response.

File

src/AvatarKitDownloadUtilityInterface.php, line 40

Class

AvatarKitDownloadUtilityInterface
Interface for download utility.

Namespace

Drupal\avatars

Code

public function createFile(ResponseInterface $response, string $default_filename) : ?FileInterface;