Skip to content

Commit

Permalink
Updating the s3_uri parameter based on the project's access type.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrystinne committed Sep 18, 2024
1 parent 1198626 commit 729aa5d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ <h5>Access the files</h5>
{% if has_s3_credentials and project.aws.sent_files and s3_uri%}
<li>
Download the files using AWS command line tools:
<pre class="shell-command">aws s3 sync --no-sign-request {{ project.aws.s3_uri }} DESTINATION</pre>
<pre class="shell-command">aws s3 sync {{ s3_uri }} DESTINATION</pre>
</li>
{% endif %}

Expand Down
5 changes: 2 additions & 3 deletions physionet-django/project/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1940,11 +1940,10 @@ def published_project(request, project_slug, version, subdir=''):
aws_id = None

if hasattr(project, 'aws'):
if aws_id is not None and project.aws.is_private:
s3_uri = project.aws.s3_uri(aws_id)
if aws_id is not None and not project.aws.is_private:
s3_uri = '--no-sign-request ' + project.aws.s3_uri(aws_id)
else:
s3_uri = project.aws.s3_uri(aws_id)
print('s3_uri: ', s3_uri)
context = {
'project': project,
'authors': authors,
Expand Down

0 comments on commit 729aa5d

Please sign in to comment.