From 1eac452d71f4ea4d0d375159f192c52ac81a690c Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Tue, 30 Dec 2014 22:07:21 +0100 Subject: [PATCH] Send file basename when uploading to OctoPrint --- lib/Slic3r/GUI/Plater.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index f83ba8a60..2517cd893 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -789,6 +789,7 @@ sub split_object { if (@model_objects == 1) { $self->resume_background_process; Slic3r::GUI::warning_catcher($self)->("The selected object couldn't be split because it contains only one part."); + $self->resume_background_process; return; } @@ -1094,7 +1095,8 @@ sub send_gcode { Content_Type => 'form-data', 'X-Api-Key' => $self->{config}->octoprint_apikey, Content => [ - file => [$self->{send_gcode_file}], + # OctoPrint doesn't like Windows paths + file => [ $self->{send_gcode_file}, basename($self->{send_gcode_file}) ], ], );