old_contents: class uploadfile():
  
      def __init__(self, name, type=None, size=None, not_allowed_msg=''):
          self.name = name
          self.type = type
          self.size = size
          self.not_allowed_msg = not_allowed_msg
          self.url = "data/%s" % name
          self.delete_url = "delete/%s" % name
          self.delete_type = "DELETE"
  
      def get_file(self):
          if self.type is not None:
              # POST an image
              if self.not_allowed_msg == '':
                  return {"name": self.name,
                          "type": self.type,
                          "size": self.size,
                          "url": self.url,
                          "deleteUrl": self.delete_url,
                          "deleteType": self.delete_type, }
  
              # File type is not allowed
              else:
                  return {"error": self.not_allowed_msg,
                          "name": self.name,
                          "type": self.type,
                          "size": self.size, }
  
          # GET normal file from disk
          else:
              return {"name": self.name,
                      "size": self.size,
                      "url": self.url,
                      "deleteUrl": self.delete_url,
                      "deleteType": self.delete_type, }
  
new_contents: class UploadFile():
  
      def __init__(self, name, type=None, size=None, not_allowed_msg=''):
          self.name = name
          self.type = type
          self.size = size
          self.not_allowed_msg = not_allowed_msg
          self.url = "data/%s" % name
          self.delete_url = "delete/%s" % name
          self.delete_type = "DELETE"
  
      def get_file(self):
          if self.type is not None:
              # POST an image
              if self.not_allowed_msg == '':
                  return {"name": self.name,
                          "type": self.type,
                          "size": self.size,
                          "url": self.url,
                          "deleteUrl": self.delete_url,
                          "deleteType": self.delete_type, }
  
              # File type is not allowed
              else:
                  return {"error": self.not_allowed_msg,
                          "name": self.name,
                          "type": self.type,
                          "size": self.size, }
  
          # GET normal file from disk
          else:
              return {"name": self.name,
                      "size": self.size,
                      "url": self.url,
                      "deleteUrl": self.delete_url,
                      "deleteType": self.delete_type, }
  
subject: Update class name to camelcase pattern.