コード例 #1
0
ファイル: views.py プロジェクト: cofreshman/igem-wiki-wizard
 def themeupload(self):
     theme_static = get_theme_folder('static')
     file = request.get_json()['file']
     ext = os.path.splitext(file)[-1]
     if ext in ['.css', '.js']:
         upload_text_file(theme_static, file)
     else:
         upload_binary_file(theme_static, file)
     return 'Theme file uploaded'
コード例 #2
0
 def themeupload(self):
     theme_static = get_theme_folder('static')
     file = request.get_json()['file']
     ext = os.path.splitext(file)[-1]
     if ext in ['.css', '.js']:
         upload_text_file(theme_static, file)
     else:
         upload_binary_file(theme_static, file)
     return 'Theme file uploaded'
コード例 #3
0
ファイル: views.py プロジェクト: cofreshman/igem-wiki-wizard
 def fileupload(self):
     file = request.get_json()['file']
     upload_binary_file(current_app.static_folder, file)
     return 'File uploaded'
コード例 #4
0
 def fileupload(self):
     file = request.get_json()['file']
     upload_binary_file(current_app.static_folder, file)
     return 'File uploaded'