def upload_fabs_file():
     if "multipart/form-data" not in request.headers['Content-Type']:
         return JsonResponse.error(ValueError("Request must be a multipart/form-data type"), StatusCode.CLIENT_ERROR)
     params = RequestDictionary.derive(request)
     fabs = params.get('_files', {}).get('fabs', None)
     file_manager = FileHandler(request, is_local=is_local, server_path=server_path)
     return file_manager.upload_fabs_file(fabs)
 def upload_fabs_file():
     if "multipart/form-data" not in request.headers['Content-Type']:
         return JsonResponse.error(ValueError("Request must be a multipart/form-data type"), StatusCode.CLIENT_ERROR)
     params = RequestDictionary.derive(request)
     fabs = params.get('_files', {}).get('fabs', None)
     file_manager = FileHandler(request, is_local=is_local, server_path=server_path)
     return file_manager.upload_fabs_file(fabs)
Пример #3
0
 def upload_detached_file():
     current_user_can('editfabs',
                      cgac_code=request.json.get('cgac_code', None),
                      frec_code=request.json.get('frec_code', None))
     file_manager = FileHandler(request,
                                is_local=is_local,
                                server_path=server_path)
     return file_manager.upload_fabs_file(create_credentials)