From 0e827319cd63d7f24caaf1c21c357e51cf65064b Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Wed, 18 Sep 2024 09:37:13 -0500 Subject: [PATCH] ensure binary write of screenshots --- workers/screenshot_worker.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workers/screenshot_worker.rb b/workers/screenshot_worker.rb index 3cf524ba..61967624 100644 --- a/workers/screenshot_worker.rb +++ b/workers/screenshot_worker.rb @@ -47,7 +47,7 @@ class ScreenshotWorker http_resp = HTTP.basic_auth(user: api_user, pass: api_password).get(uri) BlackBox.new(site, path).check_uri(http_resp.headers['X-URL']) if defined?(BlackBox) && http_resp.headers['X-URL'] - File.write base_image_tmpfile_path, http_resp.to_s + File.binwrite base_image_tmpfile_path, http_resp.body.to_s user_screenshots_path = File.join SCREENSHOTS_PATH, Site.sharding_dir(username), username screenshot_path = File.join user_screenshots_path, File.dirname(path)