refactor cropped images into explore/posts/intro

This commit is contained in:
r888888888
2017-09-12 13:03:59 -07:00
parent 31a3baf2b9
commit 4fb55657c0
6 changed files with 40 additions and 5 deletions

View File

@@ -142,6 +142,15 @@ class Post < ApplicationRecord
end
end
# this is for the 640x320 version
def cropped_file_url
if Danbooru.config.use_s3_proxy?(self)
"/cached/data/cropped/large/#{md5}.jpg"
else
"/data/cropped/large/#{md5}.jpg"
end
end
def large_file_url
if has_large?
if Danbooru.config.use_s3_proxy?(self)