@@ -110,19 +110,28 @@ def get_sample_url(self, sample_name: str) -> str:
110110 """
111111 return f"{ self .public_url } /{ self .samples_prefix } /{ sample_name } .zarr"
112112
113- def get_storage_options (self ) -> Dict [str , Any ]:
113+ def get_storage_options (self , url : Optional [ str ] = None ) -> Dict [str , Any ]:
114114 """Get fsspec storage options for this backend.
115115
116+ Args:
117+ url: Optional URL to determine protocol. If starts with http(s),
118+ returns empty options for public HTTP access.
119+
116120 Returns:
117121 Dictionary of options to pass to fsspec/zarr for cloud access
118122 """
119123 options : Dict [str , Any ] = {}
120124
125+ # For HTTP/HTTPS URLs (public bucket access), no special options needed
126+ # fsspec uses aiohttp backend which doesn't need S3 credentials
127+ if url and url .startswith (("http://" , "https://" )):
128+ return options
129+
121130 if self .backend == CloudStorageBackend .HTTP :
122- # HTTP needs no special options for public access
131+ # HTTP backend explicitly set - no special options
123132 return options
124133
125- # S3-compatible backends (B2, R2, S3)
134+ # S3-compatible backends (B2, R2, S3) - only for s3:// URLs
126135 if self .access_key and self .secret_key :
127136 options ["key" ] = self .access_key
128137 options ["secret" ] = self .secret_key
0 commit comments