From 540c83e4d1ec1bc60e6de6917b9564946c8b785f Mon Sep 17 00:00:00 2001
From: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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 <david@davidnind.com>
---
 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.11.0