@chrishamm @T3P3Tony
I have changed the requestBody in the OpenAPI.yaml file so that a parameter body is generated in Python. This works for uploading gcode files. I have not tested other files.
requestBody:
required: true
description: 'File content'
content:
application/octet-stream:
schema:
type: string
format: binary
The function call in Python then looks like this:
# Upload a file
file = "f:/temp/test.g"
name = "0:/gcodes/test-1.g"
try:
body = open(file).read()
duet_response = api_instance.rr_upload_post(body, name)
except ApiException as e:
print("Exception when calling DefaultApi->rr_upload_post: %s\n" % e)