Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path param #273

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions research/research.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from irods.data_object import iRODSDataObject
from irods.exception import CAT_NO_ACCESS_PERMISSION
from irods.message import iRODSMessage
from requests.utils import quote
from werkzeug.utils import secure_filename

import api
Expand Down Expand Up @@ -185,7 +186,7 @@ def upload_get() -> Response:
else:
raise Exception
except Exception:
# Chunk does not exists and needs to be uploaded.
# Chunk does not exist and needs to be uploaded.
response = make_response(jsonify({"message": "Chunk not found"}), 204)
response.headers["Content-Type"] = "application/json"
return response
Expand Down Expand Up @@ -266,8 +267,11 @@ def upload_post() -> Response:
@research_bp.route('/metadata/form')
def form() -> Response:
path = request.args.get('path')
escape_path = quote(path)
if path != escape_path:
abort(404)

return render_template('research/metadata-form.html', path=path)
return render_template('research/metadata-form.html', path=escape_path)


@research_bp.route('/browse/download_checksum_report')
Expand Down
Loading