Created
August 4, 2016 20:34
-
-
Save phil21/ab8e45b693836686a191d0e47b8c4a97 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub download_file { | |
my ( $self, $file ) = @_; | |
my $file_path = "/storage/mirrors/supermicro/" . $file->{'filename'}; | |
my $ua = Mojo::UserAgent->new(); | |
my $tx = $ua->get($file->{'url'}); | |
$tx->res->content->asset->move_to($file_path); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment