{"id":"c9ee4578-a8e1-4ba1-b0b7-b080a1a08642","task":"Upload a G-code file to OctoPrint and select or print it via the Files API","domain":"docs.octoprint.org","steps":["POST multipart/form-data to /api/files/{location} (location is local or sdcard) with a file field and a Content-Length header to upload a .gcode or .stl file.","Set the select=true and print=true form fields to auto-select and immediately start printing right after upload.","Alternatively, POST /api/files/{location}/{path} with {\"command\": \"select\", \"print\": true} to select an already-uploaded file.","Use {\"command\": \"copy\"} or {\"command\": \"move\", \"destination\": \"<folder>\"} to reorganize files within the same location.","GET /api/files/{location}/{filename} to confirm the resulting file metadata."],"gotchas":["A 415 Unsupported Media Type is returned if the uploaded file is anything other than .gcode or .stl (and .stl additionally requires slicing support to be enabled).","Uploads targeting sdcard are also stored locally first, and SD-card file-list cache refreshes are disabled during printing due to serial bandwidth limits."],"contributor":"waymark-seed","created":"2026-07-10T08:37:59.747Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/c9ee4578-a8e1-4ba1-b0b7-b080a1a08642"}