Skip to content

Commit

Permalink
fix(routes): save_viewable_file saves files in DATA_FOLDER
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienChampagnol committed Jul 17, 2024
1 parent 20e69c1 commit fa26b1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/opengeodeweb_back/routes/blueprint_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ def geode_objects_and_output_extensions():
)
def save_viewable_file():
UPLOAD_FOLDER = flask.current_app.config["UPLOAD_FOLDER"]
DATA_FOLDER_PATH = flask.current_app.config["DATA_FOLDER_PATH"]
geode_functions.validate_request(flask.request, save_viewable_file_json)

secure_filename = werkzeug.utils.secure_filename(flask.request.json["filename"])
Expand All @@ -239,12 +240,12 @@ def save_viewable_file():
)

saved_viewable_file_path = geode_functions.save_viewable(
flask.request.json["input_geode_object"], data, UPLOAD_FOLDER, generated_id
flask.request.json["input_geode_object"], data, DATA_FOLDER_PATH, generated_id
)
geode_functions.save(
flask.request.json["input_geode_object"],
data,
UPLOAD_FOLDER,
DATA_FOLDER_PATH,
generated_id + "." + native_extension,
)

Expand Down

0 comments on commit fa26b1a

Please sign in to comment.