Bug 23975: (follow-up) Don't rely on save_to being present
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>
This commit is contained in:
parent
f1dc82d70b
commit
553627f12c
|
|
@ -75,7 +75,7 @@ if ($plugins_enabled) {
|
|||
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 );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue