Пример #1
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'
Пример #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
 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'