upload file through commandline #128
Unanswered
KonradJuenger
asked this question in
Q&A
Replies: 2 comments 1 reply
-
curl -k -F "print=false" -F "file=@[path_to_file]" "http://192.168.0.229/server/files/upload" |
Beta Was this translation helpful? Give feedback.
0 replies
-
You could try the curl recommendation above, or you could try modifying your python script as follows: import requests
with open("D:\\01_Projekte\\python\\klipper_upload\\upload_test.gcode", "rb") as gcode:
pload = {'file': gcode, 'print': "True"}
r = requests.post("http://192.168.0.229/server/files/upload",files = pload)
print(r.text) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am desperately trying to upload a gcode file to moonraker over the commandline and print it . I don't get the hang of HTTP requests or curl and as this seems specific to moonraker, I hope it is ok to post it here. My final attempt was python requests:
but results in this error:
Thanks for any help!
Beta Was this translation helpful? Give feedback.
All reactions