Skip to content

Commit

Permalink
Return S3 data links by default when in region
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbourbeau committed Oct 13, 2023
1 parent 250848d commit 509e42c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions earthaccess/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def data_links(
s3_links = self._filter_related_links("GET DATA VIA DIRECT ACCESS")
if in_region:
# we are in us-west-2
if self.cloud_hosted and access is None:
if self.cloud_hosted and access in (None, "direct"):
# this is a cloud collection and we didn't specify the access type
# default to S3 links
if len(s3_links) == 0 and len(https_links) > 0:
Expand All @@ -325,7 +325,6 @@ def data_links(
else:
# we are not in us-west-2, even cloud collections have HTTPS links
return https_links
return https_links

def dataviz_links(self) -> List[str]:
"""
Expand Down

0 comments on commit 509e42c

Please sign in to comment.