fixes #2307
This commit is contained in:
@@ -48,4 +48,8 @@ class PixivUgoiraService
|
||||
@content_type = data[:ugoira_content_type]
|
||||
end
|
||||
end
|
||||
|
||||
def empty?
|
||||
@frame_data.nil?
|
||||
end
|
||||
end
|
||||
|
||||
@@ -53,6 +53,10 @@ class Upload < ActiveRecord::Base
|
||||
unless is_valid_content_type?
|
||||
raise "invalid content type (only JPEG, PNG, GIF, SWF, and WebM files are allowed)"
|
||||
end
|
||||
|
||||
if is_ugoira? && ugoira_service.empty?
|
||||
raise "missing frame data for ugoira"
|
||||
end
|
||||
end
|
||||
|
||||
def validate_md5_confirmation
|
||||
|
||||
Reference in New Issue
Block a user