mirror of
https://github.com/neocities/neocities.git
synced 2025-07-22 18:46:07 +02:00
scale phantomjs, enable js for screenshots, strong browse visits
This commit is contained in:
parent
90e40168a2
commit
c2ff6ca2e4
4 changed files with 11 additions and 5 deletions
2
app.rb
2
app.rb
|
@ -119,7 +119,7 @@ post '/site_files/upload' do
|
|||
|
||||
mime_type = Magic.guess_file_mime_type params[:newfile][:tempfile].path
|
||||
|
||||
unless Site::VALID_MIME_TYPES.include?(mime_type) && Site::VALID_EXTENSIONS.include?(File.extname(params[:newfile][:filename]).sub(/^./, ''))
|
||||
unless (Site::VALID_MIME_TYPES.include?(mime_type) || mime_type =~ /text/) && Site::VALID_EXTENSIONS.include?(File.extname(params[:newfile][:filename]).sub(/^./, ''))
|
||||
@errors << 'File must me one of the following: HTML, Text, Image (JPG PNG GIF JPEG SVG), JS, CSS, Markdown.'
|
||||
halt slim(:'site_files/new')
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue