Devise
Class

Devise\Media\Files\FileDownloader

class FileDownloader

Class FileDownloader downloads a file from the internet and saves it into a specified directory

Methods

__construct()

Create a new FileDownloader

string download(string $url, string $toPath, string $filename)

Download a file from the given $url and save it to $toPath with $filename.

Details

at line 15
public __construct()

Create a new FileDownloader

at line 30
public string download(string $url, string $toPath, string $filename)

Download a file from the given $url and save it to $toPath with $filename.

If $filename is null then we just use the name from the $url

Parameters

string $url
string $toPath
string $filename

Return Value

string