public function PhpCurlHttpClient::postFile in Backup and Migrate 8.4
Post a file along with other data (as an array).
Parameters
$url:
\BackupMigrate\Core\File\ReadableStreamBackupFile $file:
$data:
Return value
mixed
Overrides HttpClientInterface::postFile
File
- lib/
backup_migrate_core/ src/ Service/ PhpCurlHttpClient.php, line 51
Class
- PhpCurlHttpClient
- Class PhpCurlHttpClient.
Namespace
BackupMigrate\Core\ServiceCode
public function postFile($url, ReadableStreamBackupFile $file, $data) {
$data['file'] = new \CURLFile($file
->realpath());
$data['file']
->setPostFilename($file
->getFullName());
return $this
->post($url, $data);
}