Fix host_type comparison

host_type values are lowercase. This fixes a 404 error (because it attempts to
upload to /rr_upload) when sending G-code to Octoprint.
This commit is contained in:
Chow Loong Jin 2017-06-17 18:00:23 +08:00
parent 98fca9090b
commit 8cd25fd7e9

View File

@ -1852,7 +1852,7 @@ sub send_gcode {
my $filename = basename($self->{print}->output_filepath($main::opt{output} // '')); my $filename = basename($self->{print}->output_filepath($main::opt{output} // ''));
my $res; my $res;
if($self->{config}->print_host){ if($self->{config}->print_host){
if($self->{config}->host_type eq 'Octoprint'){ if($self->{config}->host_type eq 'octoprint'){
$res = $ua->post( $res = $ua->post(
"http://" . $self->{config}->print_host . "/api/files/local", "http://" . $self->{config}->print_host . "/api/files/local",
Content_Type => 'form-data', Content_Type => 'form-data',