From 553627f12c388576af34af12b3867ea61ea5f03a Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 13 Feb 2020 08:48:17 +0000 Subject: [PATCH] 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 Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi Signed-off-by: Martin Renvoize --- plugins/plugins-upload.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/plugins-upload.pl b/plugins/plugins-upload.pl index 7f873fa4fd..90b8730406 100755 --- a/plugins/plugins-upload.pl +++ b/plugins/plugins-upload.pl @@ -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 ); } -- 2.39.5