Skip to content

Commit 05baa1b

Browse files
committed
add corner case
1 parent 2b4eef1 commit 05baa1b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

activestorage/active.py

+5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ def return_storage_type(uri):
2727
resp = requests.head(uri)
2828
except requests.exceptions.MissingSchema: # eg local file
2929
return
30+
except requests.exceptions.InvalidSchema: # eg Minio file s3://pyactivestorage/common_cl_a.nc
31+
if not uri.startswith("s3:"):
32+
return
33+
else:
34+
return "s3"
3035
response = resp.headers
3136

3237
# https files on NGINX don't have "gateway-protocol" key

0 commit comments

Comments
 (0)