Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. JDFesto
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Controversial 0
    • Groups 0

    JDFesto

    @JDFesto

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    JDFesto Unfollow Follow

    Latest posts made by JDFesto

    • Upload gcode file with http request

      I am currently attempting to use python's request library to upload a ".g" or gcode instruction file from my computer to a Duet 3 MB 6HC, with RepRap Firmware 3.4.5 (2022-11-30). Every other get and post has been working but when it comes to uploading said file I have an issue. When I send the file content with the post request the entire content gets encapsulated with quotations making the instructions useless to the duet.

      response = requests.post(url="ip/rr_upload", params = {"name": "0:/macros/sample.g"}, 
                           json=open("sample.g").read())
      

      When looking at the download request on the browser I can see that the file has been successfully uploaded however the entire file is encapsulated with quotations. Is there a way for the duetboard to ignore the quotes?

      posted in Duet Web Control
      JDFestoundefined
      JDFesto