Browse Source

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>
20.05.x
Martin Renvoize 3 years ago
parent
commit
553627f12c
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 2
      plugins/plugins-upload.pl

2
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 );
}

Loading…
Cancel
Save