code: def _get_content_type(self, filename):
          
          mntype = mimetypes.guess_type(filename)[0]
          filename, fileExtension = os.path.splitext(filename)
          if mntype is None and\
              fileExtension.lower() == ".csv":
              mntype = "text/csv"
          elif mntype is None and \
              fileExtension.lower() == ".sd":
              mntype = "File/sd"
          elif mntype is None:
              #mntype = 'application/octet-stream'
              mntype= "File/%s" % fileExtension.replace('.', '')
          return mntype
docs: gets the content type of a file