Add matching storage manager

This commit is contained in:
Albert Yi
2018-07-05 10:03:40 -07:00
parent 4762de65e1
commit ea210bdc75
4 changed files with 7 additions and 10 deletions

View File

@@ -72,7 +72,8 @@ class StorageManager
origin
end
def file_path(md5, file_ext, type)
def file_path(post_or_md5, file_ext, type)
md5 = post_or_md5.is_a?(String) ? post_or_md5 : post_or_md5.md5
subdir = subdir_for(md5)
file = file_name(md5, file_ext, type)