Exemplo n.º 1
0
 def initialize(self):
     self.fdfs_client = FDFSUtils()
     self.res_status = dict()
     self.set_header('Access-Control-Allow-Origin', '*')
     self.set_header('Access-Control-Allow-Headers', 'X-Requested-With')
     self.set_header('Access-Control-Allow-Methods', 'POST, GET, OPTIONS')
     self.set_header('Access-Control-Max-Age', 1000)
     self.set_header('Access-Control-Allow-Headers', '*')
     self.set_header('Content-type', 'application/json')
Exemplo n.º 2
0
 def initialize(self):
     """
     第一步执行,初始化操作
     :return:
     """
     self.set_header('Content-type', 'application/json')
     self.upload_dir = FDFS_CONFIG.get('tmp_path')
     if not os.path.exists(self.upload_dir):
         os.mkdir(self.upload_dir)
     self.fdfs_client = FDFSUtils()
     self.mysql_client = MySQLUtils()
     self.file_tmp_path = None
     self.res_status = dict()
     self.file_info = dict()
Exemplo n.º 3
0
 def initialize(self):
     self.fdfs_client = FDFSUtils()
Exemplo n.º 4
0
 def initialize(self):
     self.mysql_client = MySQLUtils()
     self.fdfs_client = FDFSUtils()
     self.res_status = dict()