uploads: disallow uploading new Flash files.
Flash is dead. It's no longer supported by browsers, it's not well-supported by emulators, and only two Flash posts were uploaded in the last year anyway. Old Flash files will continue to exist, but new Flash uploads will no longer be allowed.
This commit is contained in:
@@ -13,8 +13,8 @@ class Upload < ApplicationRecord
|
||||
end
|
||||
|
||||
def validate_file_ext(record)
|
||||
if record.file_ext == "bin"
|
||||
record.errors.add(:file_ext, "is invalid (only JPEG, PNG, GIF, SWF, MP4, and WebM files are allowed")
|
||||
if record.file_ext.in?(["bin", "swf"])
|
||||
record.errors.add(:file_ext, "is invalid (only JPEG, PNG, GIF, MP4, and WebM files are allowed")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
<div class="input" id="filedropzone">
|
||||
<div class="dropzone-hint">Click or drag and drop to upload a file</div>
|
||||
<div class="dropzone-hint hint">Max size: <%= number_to_human_size(Danbooru.config.max_file_size) %>. Supported filetypes: jpg, png, gif, swf, mp4, webm.</div>
|
||||
<div class="dropzone-hint hint">Max size: <%= number_to_human_size(Danbooru.config.max_file_size) %>. Supported filetypes: jpg, png, gif, mp4, webm.</div>
|
||||
</div>
|
||||
|
||||
<div class="input string optional upload_source">
|
||||
|
||||
Reference in New Issue
Block a user