Commit b561a6d9 authored by Albert Yi's avatar Albert Yi

fixes #3742

parent 65cc1def
......@@ -7,7 +7,7 @@ class PixivUgoiraFrameData < ApplicationRecord
if data[0]["delay_msec"]
self.data = data.map.with_index do |datum, i|
filename = "%06d.jpg" % [i + 1]
filename = "%06d.jpg" % [i]
{"delay" => datum["delay_msec"], "file" => filename}
end
end
......
......@@ -161,6 +161,18 @@ class Post < ApplicationRecord
storage_manager.file_url(self, :preview)
end
def file_path
storage_manager.file_path(md5, file_ext, :original)
end
def large_file_path
storage_manager.file_path(md5, file_ext, :large)
end
def preview_file_path
storage_manager.file_path(md5, file_ext, :preview)
end
def open_graph_image_url
if is_image?
if has_large?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment