mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
ensure binary write of screenshots
This commit is contained in:
parent
48cef121a1
commit
0e827319cd
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ class ScreenshotWorker
|
||||||
|
|
||||||
http_resp = HTTP.basic_auth(user: api_user, pass: api_password).get(uri)
|
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']
|
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
|
user_screenshots_path = File.join SCREENSHOTS_PATH, Site.sharding_dir(username), username
|
||||||
screenshot_path = File.join user_screenshots_path, File.dirname(path)
|
screenshot_path = File.join user_screenshots_path, File.dirname(path)
|
||||||
|
|
Loading…
Add table
Reference in a new issue