scale phantomjs, enable js for screenshots, strong browse visits

This commit is contained in:
Kyle Drake 2013-06-23 15:40:46 -07:00
parent 90e40168a2
commit c2ff6ca2e4
4 changed files with 11 additions and 5 deletions

2
app.rb
View file

@ -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