Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    "Upload G-Code Files" button and File Open Dialog shows/allows .stl

    Scheduled Pinned Locked Moved
    Duet Web Control wishlist
    4
    7
    1.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Yonkimanundefined
      Yonkiman
      last edited by

      I originally mentioned this in the wrong place: https://www.duet3d.com/forum/thread.php?id=1977

      Would be nice if the File Open Dialog launched after clicking on "Upload G-Code Files" filtered out all files except *.gcode" files.

      Unrelated minor bug: Sometimes (I believe it's immediately after launching), Macros don't appear on the "Machine Control" page. If I then click on the "Macros" tab and then go back to "Machine Control", they do show up. Very minor but it happens several times a week for me.

      Thanks,
      Fred

      1 Reply Last reply Reply Quote 0
      • chrishammundefined
        chrishamm administrators
        last edited by

        This has been implemented as part of DWC 1.17+2. Allowed G-code formats are .g, .gcode, .gco and .tap (for pcb2gcode).

        Duet software engineer

        1 Reply Last reply Reply Quote 0
        • DADIYundefined
          DADIY
          last edited by

          I no longer get any .g files displayed when uploading after updating to the 1.19 firmware and DWC release. I have to change customized files to all files to be able to pick them from the file upload explorer. That's on Chrome version 60.

          1 Reply Last reply Reply Quote 0
          • DADIYundefined
            DADIY
            last edited by

            Looking at the code, the default filter doesn't match up with the defaults from slic3r.

            $(".btn-upload").click(function(e) {
            if (!$(this).is(".disabled")) {
            var type = $(this).data("type"), filter = "";
            if (type == "print" || type == "gcode") {
            filter = ".gcode,.gc,.gco,.tap";
            } else if (type == "filament") {
            filter = ".zip";
            } else if (type == "generic") {
            filter=".zip,.bin,.csv,.g,.json,.htm,.html,.ico,.xml,.css,.map,.js,.ttf,.eot,.svg,.woff,.woff2,.jpeg,.jpg,.png,.gz";
            }
            $("#input_file_upload").prop("accept", filter).data("type", type).click();
            }
            e.preventDefault();

            I suspect this:
            filter = ".gcode,.gc,.gco,.tap";

            should really be this for completness.
            filter = ".gcode,.gc,.g,.gco,.tap,.ngc";

            1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators
              last edited by

              Thanks for reporting this, it explains a problem I had earlier today.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              1 Reply Last reply Reply Quote 0
              • chrishammundefined
                chrishamm administrators
                last edited by

                @DADIY:

                Looking at the code, the default filter doesn't match up with the defaults from slic3r.

                $(".btn-upload").click(function(e) {
                if (!$(this).is(".disabled")) {
                var type = $(this).data("type"), filter = "";
                if (type == "print" || type == "gcode") {
                filter = ".gcode,.gc,.gco,.tap";
                } else if (type == "filament") {
                filter = ".zip";
                } else if (type == "generic") {
                filter=".zip,.bin,.csv,.g,.json,.htm,.html,.ico,.xml,.css,.map,.js,.ttf,.eot,.svg,.woff,.woff2,.jpeg,.jpg,.png,.gz";
                }
                $("#input_file_upload").prop("accept", filter).data("type", type).click();
                }
                e.preventDefault();

                I suspect this:
                filter = ".gcode,.gc,.gco,.tap";

                should really be this for completness.
                filter = ".gcode,.gc,.g,.gco,.tap,.ngc";

                Thanks, I'll fix it in my next release.

                Duet software engineer

                1 Reply Last reply Reply Quote 0
                • DADIYundefined
                  DADIY
                  last edited by

                  @chrishamm:

                  @DADIY:

                  Looking at the code, the default filter doesn't match up with the defaults from slic3r.

                  $(".btn-upload").click(function(e) {
                  if (!$(this).is(".disabled")) {
                  var type = $(this).data("type"), filter = "";
                  if (type == "print" || type == "gcode") {
                  filter = ".gcode,.gc,.gco,.tap";
                  } else if (type == "filament") {
                  filter = ".zip";
                  } else if (type == "generic") {
                  filter=".zip,.bin,.csv,.g,.json,.htm,.html,.ico,.xml,.css,.map,.js,.ttf,.eot,.svg,.woff,.woff2,.jpeg,.jpg,.png,.gz";
                  }
                  $("#input_file_upload").prop("accept", filter).data("type", type).click();
                  }
                  e.preventDefault();

                  I suspect this:
                  filter = ".gcode,.gc,.gco,.tap";

                  should really be this for completness.
                  filter = ".gcode,.gc,.g,.gco,.tap,.ngc";

                  Thanks, I'll fix it in my next release.

                  thanks Chris, for people that use Duets for CNC machines it might also be worth adding .nc which is the default from software like cambam & vectric's products.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Unless otherwise noted, all forum content is licensed under CC-BY-SA