diff --git a/cdci_data_analysis/analysis/instrument.py b/cdci_data_analysis/analysis/instrument.py index a7471b40..205cc587 100644 --- a/cdci_data_analysis/analysis/instrument.py +++ b/cdci_data_analysis/analysis/instrument.py @@ -710,6 +710,7 @@ def set_input_products_from_fronted(self, input_file_path, par_dic, verbose=Fals def update_par_dic_with_uploaded_files(self, par_dic, uploaded_files_obj, products_url, bind_host, bind_port): if validators.url(products_url): + # TODO remove the dispatch-data part, better to have it extracted from the configuration file basepath = os.path.join(products_url, 'dispatch-data/download_file') else: basepath = os.path.join(f"http://{bind_host}:{bind_port}", 'download_file') diff --git a/cdci_data_analysis/flask_app/app.py b/cdci_data_analysis/flask_app/app.py index 8d27cfe4..dab793c6 100644 --- a/cdci_data_analysis/flask_app/app.py +++ b/cdci_data_analysis/flask_app/app.py @@ -101,6 +101,7 @@ def run_api_instr_list(): '\'/instr-list\' endpoint. Please use this one in the future.\n') if app.config['conf'].products_url is not None and validators.url(app.config['conf'].products_url): + # TODO remove the dispatch-data part, better to have it extracted from the configuration file redirection_url = os.path.join(app.config['conf'].products_url, 'dispatch-data/instr-list') if request.args: args_request = urlencode(request.args) @@ -160,6 +161,7 @@ def download_products(): @app.route("/download_file", methods=['POST', 'GET', 'HEAD']) def download_file(): if app.config['conf'].products_url is not None and validators.url(app.config['conf'].products_url): + # TODO remove the dispatch-data part, better to have it extracted from the configuration file redirection_url = os.path.join(app.config['conf'].products_url, 'dispatch-data/download_products') if request.args: args_request = urlencode(request.args)