From a842167e09b69c9462fe164f70b1d9b0071ef0bc 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. --- 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.20.1