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



  • 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


  • administrators

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



  • 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.



  • 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";


  • administrators

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


  • administrators

    @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.



  • @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.


Locked
 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.