Dmyers\Storage\Adapter\Base::remoteUpload PHP Method

remoteUpload() public method

Upload a remote file into storage.
public remoteUpload ( string $url, string $target ) : boolean
$url string The url to the remote file to upload.
$target string The path to the file to store.
return boolean
    public function remoteUpload($url, $target)
    {
        $tmp_name = md5($url);
        $tmp_path = Storage::config('tmp_path') . '/' . $tmp_name;
        if (!$this->remoteDownload($url, $tmp_path)) {
            return false;
        }
        return $this->upload($tmp_path, $target);
    }