Websocktets ImportURL

I am evaluating repetier server. Most things via websockets are working. But I cannot get the importurl to work. I'm trying to import from a folder. The JSON that is generated is:
{{
  "action": "importURL",
  "data": [
    {
      "name": "Gcode_1.gcode",
      "url": "folder://BCRepetierFiles/Gcode_1.gcode",
      "job": "false"
    },
    {
      "name": "Gcode_2.gcode",
      "url": "folder://BCRepetierFiles/Gcode_2.gcode",
      "job": "false"
    },
    {
      "name": "Gcode_U.gcode",
      "url": "folder://BCRepetierFiles/Gcode_U.gcode",
      "job": "false"
    }
  ],
  "printer": "Printer1",
  "callback_id": 5
}}

The folder is known in the repetier server. 
I keep getting ok:false as callback.
Can anyone help?
//UPDATE
I found my problem, fixed it with this JSON:
{{
  "action": "importURL",
  "data": {
    "folder": "BCRepetierFiles",
    "files": [
      {
        "name": "Gcode_1.gcode",
        "url": "folder://BCRepetierFiles/Gcode_1.gcode",
        "job": "false"
      },
      {
        "name": "Gcode_2.gcode",
        "url": "folder://BCRepetierFiles/Gcode_2.gcode",
        "job": "false"
      },
      {
        "name": "Gcode_U.gcode",
        "url": "folder://BCRepetierFiles/Gcode_U.gcode",
        "job": "false"
      }
    ]
  },
  "printer": "Printer1",
  "callback_id": 4
}}

Comments

  • So now I get a callback with a messageid, but still nothing gets uploaded into the applciation, can anyone help?
  • I get this reponse: {{
      "msgId": "150c076a-e02b-4d01-a1e5-fcb15aff5fb6",
      "ok": true
    }} 
    But nothing to find on the server
  • For those having same problem:
     "job": "false"  must be  "job": false

    and

    "url": "folder://BCRepetierFiles/Gcode_1.gcode",
    must be
    "url": "folder://1/Gcode_1.gcode",

    You need to give the folder id not folder name.
Sign In or Register to comment.