Start Simulation for Duet
Author: Martin Loidl <martin.loidl@gmail.com> * PrintHost can now return a set of possible actions to be done after a upload is finished * Added new Button for starting a simulation after upload * Duet Hosts are now able to start a simulation after upload instead of starting a print * removed now unneeded config key 'printhost_print'
This commit is contained in:
parent
03a6a46dce
commit
8967ee57ed
15 changed files with 97 additions and 71 deletions
|
@ -115,11 +115,11 @@ bool AstroBox::upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, Error
|
|||
% url
|
||||
% upload_filename.string()
|
||||
% upload_parent_path.string()
|
||||
% upload_data.start_print;
|
||||
% (upload_data.post_action == PrintHostPostUploadAction::StartPrint ? "true" : "false");
|
||||
|
||||
auto http = Http::post(std::move(url));
|
||||
set_auth(http);
|
||||
http.form_add("print", upload_data.start_print ? "true" : "false")
|
||||
http.form_add("print", upload_data.post_action == PrintHostPostUploadAction::StartPrint ? "true" : "false")
|
||||
.form_add("path", upload_parent_path.string()) // XXX: slashes on windows ???
|
||||
.form_add_file("file", upload_data.source_path.string(), upload_filename.string())
|
||||
.on_complete([&](std::string body, unsigned status) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue