mirror of
https://github.com/neocities/neocities.git
synced 2025-08-06 09:34:57 +02:00
permit uploading of empty files #85
This commit is contained in:
parent
762b3c7ba6
commit
d0d6cec34e
2 changed files with 6 additions and 1 deletions
|
@ -493,7 +493,7 @@ class Site < Sequel::Model
|
|||
# extname = uploaded_file[:filename]
|
||||
#end
|
||||
|
||||
unless (Site::VALID_MIME_TYPES.include?(mime_type) || mime_type =~ /text/) &&
|
||||
unless (Site::VALID_MIME_TYPES.include?(mime_type) || mime_type =~ /text/ || mime_type =~ /inode\/x-empty/) &&
|
||||
Site::VALID_EXTENSIONS.include?(extname.sub(/^./, '').downcase)
|
||||
return false
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue