diff --git a/plugins/GCodeGzReader/GCodeGzReader.py b/plugins/GCodeGzReader/GCodeGzReader.py index 73a08075d2..4d33f00870 100644 --- a/plugins/GCodeGzReader/GCodeGzReader.py +++ b/plugins/GCodeGzReader/GCodeGzReader.py @@ -4,8 +4,16 @@ import gzip from UM.Mesh.MeshReader import MeshReader #The class we're extending/implementing. +from UM.MimeTypeDatabase import MimeTypeDatabase, MimeType #To add the .gcode.gz files to the MIME type database. from UM.PluginRegistry import PluginRegistry +MimeTypeDatabase.addMimeType( + MimeType( + name = "application/x-cura-compressed-gcode-file", + comment = "Cura Compressed GCode File", + suffixes = ["gcode.gz"] + ) +) ## A file reader that reads gzipped g-code. # diff --git a/plugins/GCodeReader/GCodeReader.py b/plugins/GCodeReader/GCodeReader.py index 45ef1e1058..498c425f68 100755 --- a/plugins/GCodeReader/GCodeReader.py +++ b/plugins/GCodeReader/GCodeReader.py @@ -1,4 +1,5 @@ # Copyright (c) 2017 Aleph Objects, Inc. +# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from UM.FileHandler.FileReader import FileReader @@ -15,7 +16,7 @@ MimeTypeDatabase.addMimeType( MimeType( name = "application/x-cura-gcode-file", comment = "Cura GCode File", - suffixes = ["gcode", "gcode.gz"] + suffixes = ["gcode"] ) )