What is the problem?
When I run the following curl script below
I see errors in my log :
tornado.access - WARNING - 400 POST /api/files/local (::ffff:192.168.1.160) 24.16ms
On the console where I run the script I get the following reposnse
No file to upload and no folder to create
curl -k http://octopi/api/files/local
-H "multipart/form-data; boundary=----WebKitFormBoundaryDeC2E3iWbTv1PwMC"
-H "X-Api-Key: 1234567890"
-d '------WebKitFormBoundaryDeC2E3iWbTv1PwMC
Content-Disposition: form-data; name="file"; filename="Benchy.gcode"
Content-Type: application/octet-stream
M109 T0 S220.000000
T0
G21
G90
...
------WebKitFormBoundaryDeC2E3iWbTv1PwMC
Content-Disposition: form-data; name="select"
true
------WebKitFormBoundaryDeC2E3iWbTv1PwMC
Content-Disposition: form-data; name="print"
false
------WebKitFormBoundaryDeC2E3iWbTv1PwMC--'
What did you already try to solve it?
I have other sample scripts that do not embed the file that work but I need this to work.
Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log
, serial.log
or output on terminal tab, ...)
Octoprint: Version 1.3.9
OctoPi: Version 0.15.1
Linux octopi 4.14.52-v7+ #1123 SMP Wed Jun 27 17:35:49 BST 2018 armv7l GNU/Linux
Thank you.