Merge pull request #4633 from xfalcox/resize-emoji-full-path
FIX: Use full path for emoji resize job
This commit is contained in:
commit
8a4e9c1940
|
@ -66,6 +66,7 @@ class Emoji
|
|||
def self.create_for(file, name)
|
||||
extension = File.extname(file.original_filename)
|
||||
path = "#{Emoji.base_directory}/#{name}#{extension}"
|
||||
full_path = "#{Rails.root}/#{path}"
|
||||
|
||||
# store the emoji
|
||||
FileUtils.mkdir_p(Pathname.new(path).dirname)
|
||||
|
@ -73,7 +74,7 @@ class Emoji
|
|||
# clear the cache
|
||||
Emoji.clear_cache
|
||||
# launch resize job
|
||||
Jobs.enqueue(:resize_emoji, path: path)
|
||||
Jobs.enqueue(:resize_emoji, path: full_path)
|
||||
# return created emoji
|
||||
Emoji[name]
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue