From 9a5fee2d1943eef4789f52e39fd8a18b7b2e7bf4 Mon Sep 17 00:00:00 2001 From: David Kocik Date: Thu, 16 May 2024 19:14:14 +0200 Subject: [PATCH] Upload path fix --- src/slic3r/GUI/Plater.cpp | 2 +- src/slic3r/Utils/PrusaConnect.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 2f605121b4..a9d00f92a7 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -6092,7 +6092,7 @@ void Plater::connect_gcode() upload_job.upload_data.set_ready = set_ready; upload_job.upload_data.position = position; upload_job.upload_data.wait_until = wait_until; - upload_job.upload_data.upload_path = filename; + upload_job.upload_data.upload_path = boost::filesystem::path(filename); p->export_gcode(fs::path(), false, std::move(upload_job)); diff --git a/src/slic3r/Utils/PrusaConnect.cpp b/src/slic3r/Utils/PrusaConnect.cpp index 1393f90887..297986cf6f 100644 --- a/src/slic3r/Utils/PrusaConnect.cpp +++ b/src/slic3r/Utils/PrusaConnect.cpp @@ -90,7 +90,7 @@ bool PrusaConnectNew::init_upload(PrintHostUpload upload_data, std::string& out) const std::string name = get_name(); const std::string file_size = std::to_string(size); const std::string access_token = GUI::wxGetApp().plater()->get_user_account()->get_access_token(); - const std::string upload_path = upload_data.upload_path.generic_string(); + //const std::string upload_path = upload_data.upload_path.generic_string(); const std::string upload_filename = upload_data.upload_path.filename().string(); std::string url = GUI::format("%1%/app/users/teams/%2%/uploads", get_host(), m_team_id); const std::string request_body_json = GUI::format( @@ -103,7 +103,7 @@ bool PrusaConnectNew::init_upload(PrintHostUpload upload_data, std::string& out) "}" , upload_filename , file_size - , upload_data.storage + "/" + upload_path + , upload_data.upload_path.string() , m_uuid );