The `save_to` shortcut method was introduced to Mojolicious in version
8.02 but we still support 7.21 as our minimum dependancy and as such we
cannot yet use it.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
if ( $uploadlocation ) {
my $ua = Mojo::UserAgent->new(max_redirects => 5);
my $tx = $ua->get($uploadlocation);
- $tx->result->save_to($tempfile);
+ $tx->result->content->asset->move_to($tempfile);
} else {
$errors{'EMPTYUPLOAD'} = 1 unless ( length($uploadfile) > 0 );
}