Paperclip: strange mime type on windows

I partially solved using this plugin to get correct mime from extension: http://code.google.com/p/mimetype-fu/

And in my model i added:

  validate :validate_content_type

  protected

  def validate_content_type     errors.add(:file, "Format #{File.mime_type?(file.path)} is invalid!") unless File.mime_type?(file.path) == "application/pdf"   end

If somebody want to get better this code will be appreciated Thanks in any case