From 1d86931381f7bb7492a20a8c8f7e73e09cf1bc73 Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 25 May 2023 09:17:17 -0500 Subject: [PATCH] Update PrintJobHistoryAPI.py to fix GET of thumbnails that broke around Octoprint 1.9 timeframe removed outdated cache_timeout and replaced with max_age, set to 1 day (86400 seconds) but whatever makes sense is good there if you wanted to change it. --- octoprint_PrintJobHistory/api/PrintJobHistoryAPI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octoprint_PrintJobHistory/api/PrintJobHistoryAPI.py b/octoprint_PrintJobHistory/api/PrintJobHistoryAPI.py index af50d2a..46f3004 100644 --- a/octoprint_PrintJobHistory/api/PrintJobHistoryAPI.py +++ b/octoprint_PrintJobHistory/api/PrintJobHistoryAPI.py @@ -440,7 +440,7 @@ def put_forceCloseEditDialog(self): @octoprint.plugin.BlueprintPlugin.route("/printJobSnapshot/", methods=["GET"]) def get_snapshot(self, snapshotFilename): absoluteFilename = self._cameraManager.buildSnapshotFilenameLocation(snapshotFilename) - return send_file(absoluteFilename, mimetype='image/jpg', cache_timeout=1) + return send_file(absoluteFilename, mimetype='image/jpg', max_age=86400) ####################################################################################### TAKE SNAPSHOT @octoprint.plugin.BlueprintPlugin.route("/takeSnapshot/", methods=["PUT"])