diff --git a/lib/Lufi/Controller/Files.pm b/lib/Lufi/Controller/Files.pm index 6ef1c25..a56b01a 100644 --- a/lib/Lufi/Controller/Files.pm +++ b/lib/Lufi/Controller/Files.pm @@ -96,7 +96,7 @@ sub upload { } # If the file size is lower than the lowest configured size or if there is no delay_for_size setting, we choose the configured max delay unless (defined $delay) { - $delay = ($json->{delay} <= $c->max_delay || $c->max_delay == 0) ? $json->{delay} : $c->max_delay; + $delay = (($json->{delay} > 0 && $json->{delay} <= $c->max_delay) || $c->max_delay == 0) ? $json->{delay} : $c->max_delay; } my $creator = $c->ip;