fcfinder
fcfinder copied to clipboard
undefined method `content_type' for nil:NilClass
I have following, code when browse folder that contains .erb file, error " undefined method `content_type' for nil:NilClass" occurs
if request.post? # binding.pry render plain: Fcfinder::Connector.new(File.join(Rails.root, 'app','views/home/*'), request.env["HTTP_HOST"], params[:fcfinder], { :max_file_size => 1_000_000, :allowed_mime => {'pdf' => 'application/pdf', 'image_file'=>['image/png', 'image/jpeg','image/x-ms-bmp','image/gif'],'html'=>'text/html','css'=>'text/css', 'js'=>'application/javascript'}, :disallowed_mime => {} }).run, :layout => false else render :layout => false end