File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 22import io
33import json
44from typing import Dict , List
5- from urllib .request import Request
65
76from indico .client .request import GraphQLRequest , HTTPMethod , HTTPRequest , RequestChain
87from indico .errors import IndicoInputError , IndicoRequestError
98
10- URL_PREFIX = "indico-file:///storage"
9+ URL_SCHEME_BLOB = "indico-blob"
10+ URL_SCHEME_LEGACY = "indico-file"
11+ URL_PREFIX = f"{ URL_SCHEME_BLOB } :///storage"
1112
1213
1314class RetrieveStorageObject (HTTPRequest ):
@@ -38,7 +39,11 @@ def __init__(self, storage_object):
3839 else :
3940 url = storage_object
4041
41- url = url .replace ("indico-file://" , "" )
42+ if url .startswith (URL_SCHEME_BLOB ):
43+ url = url .replace (f"{ URL_SCHEME_BLOB } ://" , "" )
44+ else :
45+ url = url .replace (f"{ URL_SCHEME_LEGACY } ://" , "" )
46+
4247 super ().__init__ (method = HTTPMethod .GET , path = url )
4348
4449
You can’t perform that action at this time.
0 commit comments