You are here

public function FileUploaded::rehost in N1ED - Visual editor as CKEditor plugin with Bootstrap support 8.2

Rehosts a file (downloads from some URL).

File

src/Flmngr/FileUploaderServer/lib/file/FileUploaded.php, line 134

Class

FileUploaded
Uploaded but not commited yet file. Data stucture about file is to be converted to commited file when all validations are passed.

Namespace

Drupal\n1ed\Flmngr\FileUploaderServer\lib\file

Code

public function rehost($url) {
  $dUrl = URLDownloader::download($url, $this
    ->getBaseDir() . DIRECTORY_SEPARATOR . $this
    ->getDir());
  $this
    ->setName($dUrl->fileName);
}