Callback for when the file processing (upload, optional slicing, addition to analysis queue) has finished. Depending on the file's destination triggers either streaming to SD card or directly calls selectAndOrPrint.
(filename, absFilename, destination)
| 135 | return make_response("Trying to overwrite file that is currently being printed: %s" % currentFilename, 409) |
| 136 | |
| 137 | def fileProcessingFinished(filename, absFilename, destination): |
| 138 | """ |
| 139 | Callback for when the file processing (upload, optional slicing, addition to analysis queue) has |
| 140 | finished. |
| 141 | |
| 142 | Depending on the file's destination triggers either streaming to SD card or directly calls selectAndOrPrint. |
| 143 | """ |
| 144 | if destination == FileDestinations.SDCARD: |
| 145 | return filename, printerManager().addSdFile(filename, absFilename, selectAndOrPrint) |
| 146 | else: |
| 147 | selectAndOrPrint(filename, absFilename, destination) |
| 148 | return filename |
| 149 | |
| 150 | def selectAndOrPrint(filename, absFilename, destination): |
| 151 | """ |
nothing calls this directly
no test coverage detected