Upload files with CURL
I would like to uploads files directly from Slic3r into Repetier-Server. Right now I could not get the curl command to upload a file. When I executed the command it takes some seconds to finish and I get the following output:
curl -i -v -X POST -H "Content-Type: multipart/form-data" -H "x-api-key: <APIKEY>" -F "a=upload" -F "filename=/tmp/plate.gcode" "http://<IP>:3344/printer/model/Prusa_i3_MK3"
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying <IP>...
* TCP_NODELAY set
* Connected to <IP> (<IP>) port 3344 (#0)
> POST /printer/model/Prusa_i3_MK3 HTTP/1.1
> Host: <IP>:3344
> User-Agent: curl/7.54.0
> Accept: */*
> x-api-key: <APIKEY>
> Content-Length: 290
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=------------------------ae6452420abd3487
< HTTP/1.1 100 Continue
HTTP/1.1 100 Continue
* Empty reply from server
* Connection #0 to host <IP> left intact
curl: (52) Empty reply from server
The file does not seem to be send to the server (at least I can not find it in the UI). Whenever I execute the command I get an error in /var/lib/Repetier-Server/logs/server.log
2019-02-17 12:36:53: error:~RequestContext:boost::filesystem::file_size: No such file or directory