mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Repetier-Server: Enable "Start printing after upload" (#5351)
This commit is contained in:
		
							parent
							
								
									7ce13b4a26
								
							
						
					
					
						commit
						992031620e
					
				
					 2 changed files with 6 additions and 2 deletions
				
			
		|  | @ -107,7 +107,7 @@ bool Repetier::upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, Error | |||
| 
 | ||||
|     bool res = true; | ||||
| 
 | ||||
|     auto url = make_url((boost::format("printer/model/%1%") % port).str()); | ||||
|     auto url = upload_data.start_print?make_url((boost::format("printer/job/%1%") % port).str()):make_url((boost::format("printer/model/%1%") % port).str()); | ||||
| 
 | ||||
|     BOOST_LOG_TRIVIAL(info) << boost::format("%1%: Uploading file %2% at %3%, filename: %4%, path: %5%, print: %6%, group: %7%") | ||||
|         % name | ||||
|  | @ -125,6 +125,10 @@ bool Repetier::upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, Error | |||
|         http.form_add("group", upload_data.group); | ||||
|     } | ||||
|      | ||||
|     if(upload_data.start_print) { | ||||
|         http.form_add("name", upload_filename.string()); | ||||
|     } | ||||
| 
 | ||||
|     http.form_add("a", "upload") | ||||
|         .form_add_file("filename", upload_data.source_path.string(), upload_filename.string()) | ||||
|         .on_complete([&](std::string body, unsigned status) { | ||||
|  |  | |||
|  | @ -27,7 +27,7 @@ public: | |||
|     bool upload(PrintHostUpload upload_data, ProgressFn prorgess_fn, ErrorFn error_fn) const override; | ||||
|     bool has_auto_discovery() const override { return false; } | ||||
|     bool can_test() const override { return true; } | ||||
|     bool can_start_print() const override { return false; } | ||||
|     bool can_start_print() const override { return true; } | ||||
|     bool supports_multiple_printers() const override { return true; } | ||||
|     std::string get_host() const override { return host; } | ||||
|      | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 scott0122
						scott0122